40 lines
830 B
PHP
40 lines
830 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Notifications\Notifiable;
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
use Filament\Models\Contracts\FilamentUser;
|
|
use Filament\Models\Contracts\HasName;
|
|
|
|
class User extends Authenticatable implements FilamentUser,HasName
|
|
{
|
|
use Notifiable;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'name', 'email', 'password',
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be hidden for arrays.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $hidden = [
|
|
'password', 'remember_token',
|
|
];
|
|
public function canAccessFilament(): bool
|
|
{
|
|
return str_ends_with($this->email, '@tfmm.co');
|
|
}
|
|
public function getFilamentName(): string
|
|
{
|
|
return "{$this->name}";
|
|
}
|
|
}
|