37 lines
636 B
PHP
37 lines
636 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use App\Enums\Roles;
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
use Illuminate\Notifications\Notifiable;
|
|
use Kwaadpepper\Enum\Traits\CastsEnums;
|
|
|
|
class User extends Authenticatable
|
|
{
|
|
use Notifiable, CastsEnums;
|
|
|
|
/**
|
|
* 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',
|
|
];
|
|
|
|
|
|
|
|
protected $enumCasts = [
|
|
'role' => Roles::class
|
|
];
|
|
}
|