silent-auction/app/User.php

40 lines
830 B
PHP
Raw Permalink Normal View History

2018-06-11 13:43:21 -04:00
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
2022-08-06 15:39:24 -04:00
use Filament\Models\Contracts\FilamentUser;
use Filament\Models\Contracts\HasName;
2018-06-11 13:43:21 -04:00
2022-08-06 15:39:24 -04:00
class User extends Authenticatable implements FilamentUser,HasName
2018-06-11 13:43:21 -04:00
{
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',
];
2022-08-06 15:39:24 -04:00
public function canAccessFilament(): bool
{
return str_ends_with($this->email, '@tfmm.co');
}
public function getFilamentName(): string
{
return "{$this->name}";
}
2018-06-11 13:43:21 -04:00
}