Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class Content extends BaseModel |
||
9 | { |
||
10 | use Sluggable; |
||
11 | |||
12 | /** |
||
13 | * The database table used by the model. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $table = 'content'; |
||
18 | |||
19 | protected $sluggable = array( |
||
20 | 'build_from' => 'title', |
||
21 | 'save_to' => 'slug', |
||
22 | 'on_update' => true, |
||
23 | ); |
||
24 | |||
25 | // Add the 'avatar' attachment to the fillable array so that it's mass-assignable on this model. |
||
26 | protected $fillable = ['id', 'active', 'content_group_id', 'title', 'content', 'meta_title', 'meta_description', 'meta_keywords', 'shop_id']; |
||
27 | |||
28 | public function sluggable() |
||
29 | { |
||
30 | return [ |
||
31 | 'slug' => [ |
||
32 | 'source' => 'title' |
||
33 | ] |
||
34 | ]; |
||
35 | } |
||
36 | |||
37 | public function contentGroup() |
||
40 | } |
||
41 | |||
42 | public function contentImages() |
||
45 | } |
||
46 | } |
||
47 |