+Static Content library, basic version

This commit is contained in:
Andrey Pokidov committed 2020-03-30 14:08:41 +07:00
commit 664437d63a
4 files changed
+109

No files matched your search

+32
View File
@@ -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;
}
}