1 | <?php namespace Arcanedev\LaravelSeo\Models; |
||
25 | class Meta extends AbstractModel |
||
26 | { |
||
27 | /* ----------------------------------------------------------------- |
||
28 | | Properties |
||
29 | | ----------------------------------------------------------------- |
||
30 | */ |
||
31 | /** |
||
32 | * The attributes that are mass assignable. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $fillable = ['title', 'description', 'keywords', 'metas', 'noindex']; |
||
37 | |||
38 | /** |
||
39 | * The attributes that should be casted to native types. |
||
40 | * |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $casts = [ |
||
44 | 'id' => 'integer', |
||
45 | 'seoable_id' => 'integer', |
||
46 | 'keywords' => 'collection', |
||
47 | 'metas' => 'collection', |
||
48 | 'noindex' => 'boolean', |
||
49 | ]; |
||
50 | |||
51 | /* ----------------------------------------------------------------- |
||
52 | | Constructor |
||
53 | | ----------------------------------------------------------------- |
||
54 | */ |
||
55 | /** |
||
56 | * Meta constructor. |
||
57 | * |
||
58 | * @param array $attributes |
||
59 | */ |
||
60 | 24 | public function __construct(array $attributes = []) |
|
66 | |||
67 | /* ----------------------------------------------------------------- |
||
68 | | Relationships |
||
69 | | ----------------------------------------------------------------- |
||
70 | */ |
||
71 | /** |
||
72 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
73 | */ |
||
74 | 6 | public function seoable() |
|
78 | |||
79 | /* ----------------------------------------------------------------- |
||
80 | | Other Methods |
||
81 | | ----------------------------------------------------------------- |
||
82 | */ |
||
83 | /** |
||
84 | * Prepare the attributes. |
||
85 | * |
||
86 | * @param array $attributes |
||
87 | * |
||
88 | * @return array |
||
89 | */ |
||
90 | 24 | public static function prepareAttributes(array $attributes) |
|
100 | } |
||
101 |