2023-05-16 04:51:54 +00:00
|
|
|
<?php
|
|
|
|
|
2023-05-20 14:10:32 +00:00
|
|
|
namespace Modules\Usermanager\Entities;
|
2023-05-16 04:51:54 +00:00
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
use Laravel\Sanctum\HasApiTokens;
|
|
|
|
use Spatie\Permission\Traits\HasRoles;
|
|
|
|
use Wildside\Userstamps\Userstamps;
|
|
|
|
|
|
|
|
class User extends Authenticatable
|
|
|
|
{
|
|
|
|
use HasApiTokens, HasFactory, Notifiable, Userstamps;
|
|
|
|
use HasRoles;
|
|
|
|
|
2023-05-20 14:10:32 +00:00
|
|
|
protected $guard_name = ['web', 'api'];
|
|
|
|
|
2023-05-16 04:51:54 +00:00
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array<int, string>
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
|
|
|
'name',
|
|
|
|
'email',
|
2023-05-20 14:19:49 +00:00
|
|
|
'password'
|
2023-05-16 04:51:54 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that should be hidden for serialization.
|
|
|
|
*
|
|
|
|
* @var array<int, string>
|
|
|
|
*/
|
|
|
|
protected $hidden = [
|
|
|
|
'password',
|
|
|
|
'remember_token',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that should be cast.
|
|
|
|
*
|
|
|
|
* @var array<string, string>
|
|
|
|
*/
|
|
|
|
protected $casts = [
|
|
|
|
'email_verified_at' => 'datetime',
|
|
|
|
];
|
|
|
|
}
|