1 | <?php |
||
44 | class Attribute extends BaseAttribute |
||
45 | { |
||
46 | use LogsActivity; |
||
47 | |||
48 | /** |
||
49 | * Indicates whether to log only dirty attributes or all. |
||
50 | * |
||
51 | * @var bool |
||
52 | */ |
||
53 | protected static $logOnlyDirty = true; |
||
54 | |||
55 | /** |
||
56 | * The attributes that are logged on change. |
||
57 | * |
||
58 | * @var array |
||
59 | */ |
||
60 | protected static $logAttributes = [ |
||
61 | 'name', |
||
62 | 'slug', |
||
63 | 'description', |
||
64 | 'sort_order', |
||
65 | 'group', |
||
66 | 'type', |
||
67 | 'entities', |
||
68 | 'is_required', |
||
69 | 'is_collection', |
||
70 | 'default', |
||
71 | ]; |
||
72 | |||
73 | /** |
||
74 | * The attributes that are ignored on change. |
||
75 | * |
||
76 | * @var array |
||
77 | */ |
||
78 | protected static $ignoreChangedAttributes = [ |
||
|
|||
79 | 'created_at', |
||
80 | 'updated_at', |
||
81 | 'deleted_at', |
||
82 | ]; |
||
83 | |||
84 | /** |
||
85 | * Get the route key for the model. |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getRouteKeyName() |
||
93 | |||
94 | /** |
||
95 | * Get the class name for polymorphic relations. |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | public function getMorphClass() |
||
103 | } |
||
104 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.