You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
606 B
PHP

<?php
namespace Artmark\Content\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Description of Content
*
* @author Andrey Pokidov <pokidov@e-traffic.ru>
*/
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;
}
}