User.php 955 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App\Models;
  3. // use Illuminate\Contracts\Auth\MustVerifyEmail;
  4. use Illuminate\Database\Eloquent\Factories\HasFactory;
  5. use Illuminate\Foundation\Auth\User as Authenticatable;
  6. use Illuminate\Notifications\Notifiable;
  7. class User extends Authenticatable
  8. {
  9. /** @use HasFactory<\Database\Factories\UserFactory> */
  10. use HasFactory, Notifiable;
  11. /**
  12. * The attributes that are mass assignable.
  13. *
  14. * @var list<string>
  15. */
  16. protected $fillable = ['name', 'email', 'password'];
  17. /**
  18. * The attributes that should be hidden for serialization.
  19. *
  20. * @var list<string>
  21. */
  22. protected $hidden = ['password', 'remember_token'];
  23. /**
  24. * Get the attributes that should be cast.
  25. *
  26. * @return array<string, string>
  27. */
  28. protected function casts(): array
  29. {
  30. return [
  31. 'email_verified_at' => 'datetime',
  32. 'password' => 'hashed',
  33. ];
  34. }
  35. }