ldc-laravel-base-project/app/Models/User.php

33 lines
840 B
PHP
Raw Normal View History

2026-02-18 15:07:25 +01:00
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Database\Factories\UserFactory;
2026-04-15 12:46:28 +02:00
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Hidden;
2026-02-18 15:07:25 +01:00
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
2026-04-15 12:46:28 +02:00
#[Fillable(['name', 'email', 'password'])]
#[Hidden(['password', 'remember_token'])]
2026-02-18 15:07:25 +01:00
class User extends Authenticatable
{
/** @use HasFactory<UserFactory> */
use HasFactory, Notifiable;
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
}