1 | <?php namespace Arcanesoft\Seo\Models; |
||
22 | class Footer extends AbstractModel |
||
23 | { |
||
24 | /* ----------------------------------------------------------------- |
||
25 | | Traits |
||
26 | | ----------------------------------------------------------------- |
||
27 | */ |
||
28 | use Seoable, |
||
29 | Presenters\FooterPresenter; |
||
30 | |||
31 | /* ----------------------------------------------------------------- |
||
32 | | Properties |
||
33 | | ----------------------------------------------------------------- |
||
34 | */ |
||
35 | /** |
||
36 | * The attributes that are mass assignable. |
||
37 | * |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $fillable = [ |
||
41 | 'page_id', 'locale', 'uri', 'name', 'localization', |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * The attributes that should be cast to native types. |
||
46 | * |
||
47 | * @var array |
||
48 | */ |
||
49 | protected $casts = [ |
||
50 | 'id' => 'integer', |
||
51 | 'page_id' => 'integer', |
||
52 | ]; |
||
53 | |||
54 | /* ----------------------------------------------------------------- |
||
55 | | Constructor |
||
56 | | ----------------------------------------------------------------- |
||
57 | */ |
||
58 | /** |
||
59 | * Footer constructor. |
||
60 | * |
||
61 | * @param array $attributes |
||
62 | */ |
||
63 | public function __construct(array $attributes = []) |
||
70 | |||
71 | /** |
||
72 | * The "booting" method of the model. |
||
73 | * |
||
74 | * @todo: Refactor to dedicated observer |
||
75 | */ |
||
76 | protected static function boot() |
||
84 | |||
85 | /* ----------------------------------------------------------------- |
||
86 | | Relationships |
||
87 | | ----------------------------------------------------------------- |
||
88 | */ |
||
89 | /** |
||
90 | * Page's relationship. |
||
91 | * |
||
92 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
93 | */ |
||
94 | public function page() |
||
98 | |||
99 | /* ----------------------------------------------------------------- |
||
100 | | Main Methods |
||
101 | | ----------------------------------------------------------------- |
||
102 | */ |
||
103 | public static function createOne(array $attributes) |
||
123 | |||
124 | public function updateOne(array $attributes) |
||
128 | } |
||
129 |