1 | <?php |
||
68 | class Tenant extends BaseTenant implements HasMedia |
||
69 | { |
||
70 | use Taggable; |
||
71 | use Auditable; |
||
72 | use LogsActivity; |
||
73 | use HasMediaTrait; |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | protected $fillable = [ |
||
79 | 'name', |
||
80 | 'title', |
||
81 | 'description', |
||
82 | 'owner_id', |
||
83 | 'owner_type', |
||
84 | 'email', |
||
85 | 'website', |
||
86 | 'phone', |
||
87 | 'language_code', |
||
88 | 'country_code', |
||
89 | 'state', |
||
90 | 'city', |
||
91 | 'address', |
||
92 | 'postal_code', |
||
93 | 'launch_date', |
||
94 | 'group', |
||
95 | 'style', |
||
96 | 'is_active', |
||
97 | ]; |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | protected $casts = [ |
||
103 | 'name' => 'string', |
||
104 | 'owner_id' => 'integer', |
||
105 | 'owner_type' => 'string', |
||
106 | 'email' => 'string', |
||
107 | 'website' => 'string', |
||
108 | 'phone' => 'string', |
||
109 | 'country_code' => 'string', |
||
110 | 'language_code' => 'string', |
||
111 | 'state' => 'string', |
||
112 | 'city' => 'string', |
||
113 | 'address' => 'string', |
||
114 | 'postal_code' => 'string', |
||
115 | 'launch_date' => 'string', |
||
116 | 'group' => 'string', |
||
117 | 'style' => 'string', |
||
118 | 'is_active' => 'boolean', |
||
119 | 'deleted_at' => 'datetime', |
||
120 | ]; |
||
121 | |||
122 | /** |
||
123 | * Indicates whether to log only dirty attributes or all. |
||
124 | * |
||
125 | * @var bool |
||
126 | */ |
||
127 | protected static $logOnlyDirty = true; |
||
128 | |||
129 | /** |
||
130 | * The attributes that are logged on change. |
||
131 | * |
||
132 | * @var array |
||
133 | */ |
||
134 | protected static $logFillable = true; |
||
135 | |||
136 | /** |
||
137 | * The attributes that are ignored on change. |
||
138 | * |
||
139 | * @var array |
||
140 | */ |
||
141 | protected static $ignoreChangedAttributes = [ |
||
142 | 'created_at', |
||
143 | 'updated_at', |
||
144 | 'deleted_at', |
||
145 | ]; |
||
146 | |||
147 | /** |
||
148 | * Create a new Eloquent model instance. |
||
149 | * |
||
150 | * @param array $attributes |
||
151 | */ |
||
152 | public function __construct(array $attributes = []) |
||
179 | |||
180 | /** |
||
181 | * Get the value of the model's route key. |
||
182 | * |
||
183 | * @return mixed |
||
184 | */ |
||
185 | public function getRouteKey() |
||
189 | |||
190 | /** |
||
191 | * Retrieve the model for a bound value. |
||
192 | * |
||
193 | * @param mixed $value |
||
194 | * @return \Illuminate\Database\Eloquent\Model|null |
||
195 | */ |
||
196 | public function resolveRouteBinding($value) |
||
202 | |||
203 | /** |
||
204 | * Register media collections. |
||
205 | * |
||
206 | * @return void |
||
207 | */ |
||
208 | public function registerMediaCollections(): void |
||
213 | |||
214 | /** |
||
215 | * Get all attached managers to tenant. |
||
216 | * |
||
217 | * @return \Illuminate\Database\Eloquent\Relations\MorphToMany |
||
218 | */ |
||
219 | public function managers(): MorphToMany |
||
223 | } |
||
224 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.