2016-05-19 15:01:28 +01:00
|
|
|
<?php
|
|
|
|
|
|
2018-01-15 14:02:13 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2017-12-19 16:00:42 +00:00
|
|
|
namespace App\Models;
|
2016-05-19 15:01:28 +01:00
|
|
|
|
2026-04-07 09:01:19 +01:00
|
|
|
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
|
|
|
|
use Database\Factories\UserFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
|
|
|
use Illuminate\Database\Eloquent\Attributes\Hidden;
|
2020-10-19 19:41:50 +01:00
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
2023-09-25 18:31:38 +01:00
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
2016-05-19 15:01:28 +01:00
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
2019-10-27 16:29:15 +00:00
|
|
|
use Illuminate\Notifications\Notifiable;
|
2020-02-22 12:09:26 +00:00
|
|
|
|
2026-04-07 09:01:19 +01:00
|
|
|
#[Fillable(['name', 'password'])]
|
|
|
|
|
#[Hidden(['password', 'remember_token'])]
|
2016-05-19 15:01:28 +01:00
|
|
|
class User extends Authenticatable
|
|
|
|
|
{
|
2026-04-07 09:01:19 +01:00
|
|
|
/** @use HasFactory<UserFactory> */
|
|
|
|
|
use HasFactory, Notifiable;
|
2016-09-06 16:40:39 +01:00
|
|
|
|
2026-04-07 09:01:19 +01:00
|
|
|
/**
|
|
|
|
|
* Get the attributes that should be cast.
|
|
|
|
|
*
|
|
|
|
|
* @return array<string, string>
|
|
|
|
|
*/
|
|
|
|
|
protected function casts(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'email_verified_at' => 'datetime',
|
|
|
|
|
'password' => 'hashed',
|
|
|
|
|
];
|
|
|
|
|
}
|
2023-09-25 18:31:38 +01:00
|
|
|
|
|
|
|
|
public function passkey(): HasMany
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(Passkey::class);
|
|
|
|
|
}
|
2016-05-19 15:01:28 +01:00
|
|
|
}
|