*/ protected $fillable = [ 'name', 'surname', 'patronymic', 'phone_number', 'email', 'password', 'role', 'warehouse_id', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'password', 'remember_token', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'role' => RoleEnum::class, ]; public function car(): HasOne { return $this->hasOne(Car::class); } public function deliveries(): HasMany { return $this->hasMany(Delivery::class); } public function warehouse(): BelongsTo { return $this->belongsTo(Warehouse::class); } protected function fio(): Attribute { return Attribute::make( get: fn () => $this->surname . ' ' . $this->name . ' ' . $this->patronymic, ); } }