+Static Content library, basic version
This commit is contained in:
commit
664437d63a
4 files changed
+109
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user