1 | <?php |
||
42 | class Tag extends BaseTag |
||
43 | { |
||
44 | use Auditable; |
||
45 | use HashidsTrait; |
||
46 | use LogsActivity; |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | protected $fillable = [ |
||
52 | 'slug', |
||
53 | 'name', |
||
54 | 'description', |
||
55 | 'sort_order', |
||
56 | 'group', |
||
57 | 'style', |
||
58 | 'icon', |
||
59 | ]; |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | protected $casts = [ |
||
65 | 'slug' => 'string', |
||
66 | 'sort_order' => 'integer', |
||
67 | 'group' => 'string', |
||
68 | 'style' => 'string', |
||
69 | 'icon' => 'string', |
||
70 | 'deleted_at' => 'datetime', |
||
71 | ]; |
||
72 | |||
73 | /** |
||
74 | * Indicates whether to log only dirty attributes or all. |
||
75 | * |
||
76 | * @var bool |
||
77 | */ |
||
78 | protected static $logOnlyDirty = true; |
||
79 | |||
80 | /** |
||
81 | * The attributes that are logged on change. |
||
82 | * |
||
83 | * @var array |
||
84 | */ |
||
85 | protected static $logFillable = true; |
||
86 | |||
87 | /** |
||
88 | * The attributes that are ignored on change. |
||
89 | * |
||
90 | * @var array |
||
91 | */ |
||
92 | protected static $ignoreChangedAttributes = [ |
||
93 | 'created_at', |
||
94 | 'updated_at', |
||
95 | 'deleted_at', |
||
96 | ]; |
||
97 | |||
98 | /** |
||
99 | * Create a new Eloquent model instance. |
||
100 | * |
||
101 | * @param array $attributes |
||
102 | */ |
||
103 | public function __construct(array $attributes = []) |
||
118 | |||
119 | /** |
||
120 | * Get the route key for the model. |
||
121 | * |
||
122 | * @return string |
||
123 | */ |
||
124 | public function getRouteKeyName() |
||
128 | } |
||
129 |