adrema/app/User.php

33 lines
711 B
PHP
Raw Normal View History

2020-04-10 20:32:12 +02:00
<?php
namespace App;
2023-09-08 00:29:37 +02:00
use App\Auth\ResetPassword;
2024-09-22 17:32:29 +02:00
use Database\Factories\UserFactory;
2021-11-23 19:15:39 +01:00
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
2023-09-08 00:29:37 +02:00
use Illuminate\Notifications\Notifiable;
2020-04-10 20:32:12 +02:00
class User extends Authenticatable
{
2024-09-22 17:32:29 +02:00
/** @use HasFactory<UserFactory> */
2021-11-23 19:15:39 +01:00
use HasFactory;
2023-09-08 00:29:37 +02:00
use Notifiable;
2022-05-31 22:17:35 +02:00
public $guarded = [];
2023-09-08 00:29:37 +02:00
/**
* @param string $token
* @return void
*/
public function sendPasswordResetNotification($token)
{
$this->notify(new ResetPassword($token));
}
2024-07-31 22:41:02 +02:00
public function getGravatarUrl(): string
{
return 'https://www.gravatar.com/avatar/' . hash('sha256', $this->email);
}
2020-04-10 20:32:12 +02:00
}