2024-02-27 22:53:57 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
use Laravel\Sanctum\HasApiTokens;
|
2024-03-02 18:06:48 +07:00
|
|
|
use Spatie\Permission\Traits\HasRoles;
|
2024-02-27 22:53:57 +07:00
|
|
|
|
|
|
|
class User extends Authenticatable
|
|
|
|
{
|
2024-03-02 18:06:48 +07:00
|
|
|
use HasApiTokens, HasFactory, Notifiable, HasRoles;
|
2024-02-27 22:53:57 +07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array<int, string>
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
|
|
|
'name',
|
|
|
|
'email',
|
|
|
|
'password',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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',
|
|
|
|
'password' => 'hashed',
|
|
|
|
];
|
2024-03-02 18:06:48 +07:00
|
|
|
|
2024-02-27 22:53:57 +07:00
|
|
|
}
|