*/ protected $hidden = [ 'password', 'remember_token', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'email_verified_at' => 'datetime', ]; /** * Send the password reset notification. * * @param string $token * @return void */ public function sendPasswordResetNotification($token) { $this->notify(new ResetPassword($token)); Log::info('Password reset token sent'); } /** * set Email attribute * @param string $value */ public function setEmailAttribute($value) : void { $this->attributes['email'] = strtolower($value); } /** * Returns an WebAuthnAuthenticatable user from a given Credential ID. * * @param string $id * @return WebAuthnAuthenticatable|null */ public static function getFromCredentialId(string $id): ?WebAuthnAuthenticatable { return static::whereHas( 'webauthnCredentials', static function ($query) use ($id) { return $query->whereKey($id); } )->first(); } }