1 | <?php namespace Arcanedev\LaravelSeo\Models; |
||
24 | class Seo extends Model |
||
25 | { |
||
26 | /* ------------------------------------------------------------------------------------------------ |
||
27 | | Properties |
||
28 | | ------------------------------------------------------------------------------------------------ |
||
29 | */ |
||
30 | /** |
||
31 | * The table associated with the model. |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $table = 'seo'; |
||
36 | |||
37 | /** |
||
38 | * The attributes that are mass assignable. |
||
39 | * |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $fillable = ['title', 'keywords', 'description', 'metas', 'noindex']; |
||
43 | |||
44 | /** |
||
45 | * The attributes that should be casted to native types. |
||
46 | * |
||
47 | * @var array |
||
48 | */ |
||
49 | protected $casts = [ |
||
50 | 'id' => 'integer', |
||
51 | 'seoable_id' => 'integer', |
||
52 | 'metas' => 'collection', |
||
53 | 'noindex' => 'boolean', |
||
54 | ]; |
||
55 | |||
56 | /* ------------------------------------------------------------------------------------------------ |
||
57 | | Constructor |
||
58 | | ------------------------------------------------------------------------------------------------ |
||
59 | */ |
||
60 | /** |
||
61 | * Create a new Eloquent model instance. |
||
62 | * |
||
63 | * @param array $attributes |
||
64 | */ |
||
65 | 36 | public function __construct(array $attributes = []) |
|
71 | |||
72 | /* ------------------------------------------------------------------------------------------------ |
||
73 | | Relationships |
||
74 | | ------------------------------------------------------------------------------------------------ |
||
75 | */ |
||
76 | /** |
||
77 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
78 | */ |
||
79 | 9 | public function seoable() |
|
83 | } |
||
84 |