*/ use HasFactory, Notifiable, HasUuids, HasRoles; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'email', 'password', 'department_id', 'asset_location_id', 'two_factor_enabled', 'two_factor_secret', 'two_factor_recovery_codes', 'two_factor_confirmed_at', 'last_active_at', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'password', 'remember_token', 'two_factor_secret', 'two_factor_recovery_codes', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'two_factor_confirmed_at' => 'datetime', 'two_factor_enabled' => 'boolean', 'two_factor_recovery_codes' => 'array', 'last_active_at' => 'datetime', ]; } public function department() { return $this->belongsTo(Department::class); } public function assetLocation() { return $this->belongsTo(AssetLocation::class); } }