*/ protected $fillable = [ 'urole_id', 'username', 'email', 'password', 'fullname', 'avatar', 'phone', 'last_active', 'created_at', 'updated_at', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'password', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'password' => 'hashed', ]; public function getJWTIdentifier() { return $this->getKey(); } public function getJWTCustomClaims() { return []; } public function role() { return $this->belongsTo(UserRole::class, 'urole_id'); } public function sendPasswordResetNotification($token) { $this->notify(new PasswordReset($token)); } }