*/ class Content extends Model { const MAXIMAL_TITLE_LENGTH = 1024; const STATUS_DRAFT = 0x0; const STATUS_PUBLISHED = 0x1; protected $fillable = [ 'title', 'keywords', 'description', 'body' ]; public function isDraft() { return $this->status == self::STATUS_DRAFT; } public function isPublished() { return $this->status == self::STATUS_PUBLISHED; } }