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