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