*/ use HasApiTokens, HasFactory, Notifiable; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'email', 'password', 'username', 'preferred_locale', 'first_name', 'last_name', 'address', 'phone', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'password', 'remember_token', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; } protected function fullName(): Attribute { return Attribute::make( get: fn () => $this->first_name . ' ' . $this->last_name, ); } public function tenant(): HasOne { return $this->hasOne(Tenant::class); } }