1 | <?php namespace Arcanesoft\Pages\Models; |
||
22 | class Page extends Model |
||
23 | { |
||
24 | /* ------------------------------------------------------------------------------------------------ |
||
25 | | Trait |
||
26 | | ------------------------------------------------------------------------------------------------ |
||
27 | */ |
||
28 | use SoftDeletes; |
||
29 | |||
30 | /* ------------------------------------------------------------------------------------------------ |
||
31 | | Properties |
||
32 | | ------------------------------------------------------------------------------------------------ |
||
33 | */ |
||
34 | /** |
||
35 | * The table associated with the model. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $table = 'pages'; |
||
40 | |||
41 | /** |
||
42 | * The attributes that are mass assignable. |
||
43 | * |
||
44 | * @var array |
||
45 | */ |
||
46 | protected $fillable = ['title', 'slug', 'body', 'active', 'parent_id']; |
||
47 | |||
48 | /** |
||
49 | * The accessors to append to the model's array form. |
||
50 | * |
||
51 | * @var array |
||
52 | */ |
||
53 | protected $appends = ['excerpt']; |
||
54 | |||
55 | /** |
||
56 | * The attributes that should be mutated to dates. |
||
57 | * |
||
58 | * @var array |
||
59 | */ |
||
60 | protected $dates = ['deleted_at']; |
||
61 | |||
62 | /* ------------------------------------------------------------------------------------------------ |
||
63 | | Getters & Setters |
||
64 | | ------------------------------------------------------------------------------------------------ |
||
65 | */ |
||
66 | /** |
||
67 | * The pages short content. |
||
68 | * |
||
69 | * @return null|string |
||
70 | */ |
||
71 | public function getExcerptAttribute() |
||
77 | } |
||
78 |