forked from TFMM/silent-auction
upgrade to new versions
This commit is contained in:
+18
-2
@@ -6,8 +6,9 @@ use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Filament\Models\Contracts\FilamentUser;
|
||||
use Filament\Models\Contracts\HasName;
|
||||
use Filament\Panel;
|
||||
|
||||
class User extends Authenticatable implements FilamentUser,HasName
|
||||
class User extends Authenticatable implements FilamentUser, HasName
|
||||
{
|
||||
use Notifiable;
|
||||
|
||||
@@ -28,10 +29,25 @@ class User extends Authenticatable implements FilamentUser,HasName
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
];
|
||||
public function canAccessFilament(): bool
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
|
||||
public function canAccessPanel(Panel $panel): bool
|
||||
{
|
||||
return str_ends_with($this->email, '@tfmm.co');
|
||||
}
|
||||
|
||||
public function getFilamentName(): string
|
||||
{
|
||||
return "{$this->name}";
|
||||
|
||||
Reference in New Issue
Block a user