feat(user): menambahkan trait dan hidden password
This commit is contained in:
parent
20cafbaad7
commit
469fc0e3a1
@ -6,6 +6,7 @@
|
||||
|
||||
use App\Enums\UserStatus;
|
||||
use Dyrynda\Database\Support\CascadeSoftDeletes;
|
||||
use Illuminate\Auth\Passwords\CanResetPassword;
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Attributes\Scope;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
@ -21,7 +22,7 @@
|
||||
|
||||
class User extends Authenticatable implements MustVerifyEmail
|
||||
{
|
||||
use CascadeSoftDeletes, HasFactory, HashableId, HasRoles, Notifiable, SoftDeletes;
|
||||
use CanResetPassword, CascadeSoftDeletes, HasFactory, HashableId, HasRoles, Notifiable, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
@ -34,6 +35,8 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
'articles',
|
||||
];
|
||||
|
||||
protected $hidden = ['password', 'remember_token'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user