diff options
| author | Nick Van Doorn <nick@nvandoorn.com> | 2025-04-21 15:04:28 -0700 |
|---|---|---|
| committer | Nick Van Doorn <nick@nvandoorn.com> | 2025-04-21 15:04:28 -0700 |
| commit | 9cdf46ae1ceff8dce9dd5b1c8587f2d948a88e2c (patch) | |
| tree | 863cf7e6738a4cd432ac9c0106d48bb2294d0f32 /app/Models | |
Diffstat (limited to 'app/Models')
| -rw-r--r-- | app/Models/User.php | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/app/Models/User.php b/app/Models/User.php new file mode 100644 index 0000000..749c7b7 --- /dev/null +++ b/app/Models/User.php @@ -0,0 +1,48 @@ +<?php + +namespace App\Models; + +// use Illuminate\Contracts\Auth\MustVerifyEmail; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Foundation\Auth\User as Authenticatable; +use Illuminate\Notifications\Notifiable; + +class User extends Authenticatable +{ + /** @use HasFactory<\Database\Factories\UserFactory> */ + use HasFactory, Notifiable; + + /** + * The attributes that are mass assignable. + * + * @var list<string> + */ + protected $fillable = [ + 'name', + 'email', + 'password', + ]; + + /** + * The attributes that should be hidden for serialization. + * + * @var list<string> + */ + protected $hidden = [ + 'password', + 'remember_token', + ]; + + /** + * Get the attributes that should be cast. + * + * @return array<string, string> + */ + protected function casts(): array + { + return [ + 'email_verified_at' => 'datetime', + 'password' => 'hashed', + ]; + } +} |
