update api
This commit is contained in:
@@ -6,15 +6,20 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use HasFactory, Notifiable, HasApiTokens, SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
'email_verified_at',
|
||||
'role',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
@@ -27,6 +32,12 @@ class User extends Authenticatable
|
||||
return [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
'role' => \App\Enums\Role::class,
|
||||
];
|
||||
}
|
||||
|
||||
protected function profile(): HasOne
|
||||
{
|
||||
return $this->hasOne(\App\Models\Profile::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user