| 1 | <?php |
||
| 12 | class Post extends Repository |
||
| 13 | { |
||
| 14 | use HasTranslations, ActivateableTrait, Presenterable, HasImages; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var PostPresenter |
||
| 18 | */ |
||
| 19 | protected $presenter = PostPresenter::class; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var array |
||
| 23 | */ |
||
| 24 | protected $fillable = ['status', 'active', 'view_count']; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | public $translatedAttributes = [ |
||
| 30 | 'title', 'slug', 'body', 'seo_title', 'seo_description', 'seo_keywords' |
||
| 31 | ]; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Status is published scope. |
||
| 35 | * |
||
| 36 | * @param $query |
||
| 37 | * @return mixed |
||
| 38 | */ |
||
| 39 | public function scopePublished($query) |
||
| 43 | } |