*/ protected $fillable = [ 'name', 'email', 'password', ]; /** * 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', ]; /** * The accessors to append to the model's array form. * * @var array */ protected $appends = [ 'profile_photo_url', ]; public function canAccessPanel(Panel $panel): bool { return true; } public function getTenants(Panel $panel): array | Collection { return $this->allCompanies(); } public function canAccessTenant(Model $tenant): bool { return $this->belongsToCompany($tenant); } public function getDefaultTenant(Panel $panel): ?Model { return $this->currentCompany; } public function getFilamentAvatarUrl(): string { return $this->profile_photo_url; } public function managerOf(): HasMany { return $this->hasMany(Department::class, 'manager_id'); } }