User.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. use Laravel\Sanctum\HasApiTokens;
  8. class User extends Authenticatable
  9. {
  10. use HasApiTokens, HasFactory, Notifiable;
  11. /**
  12. * The attributes that are mass assignable.
  13. *
  14. * @var array<int, string>
  15. */
  16. protected $fillable = [
  17. 'name',
  18. 'cognome',
  19. 'telefono',
  20. 'cellulare',
  21. 'email',
  22. 'password',
  23. 'level',
  24. 'enabled',
  25. 'first_login_completed',
  26. 'first_login_at',
  27. ];
  28. /**
  29. * The attributes that should be hidden for serialization.
  30. *
  31. * @var array<int, string>
  32. */
  33. protected $hidden = [
  34. 'password',
  35. 'remember_token',
  36. ];
  37. /**
  38. * The attributes that should be cast.
  39. *
  40. * @var array<string, string>
  41. */
  42. protected $casts = [
  43. 'email_verified_at' => 'datetime',
  44. 'first_login_at' => 'datetime',
  45. 'first_login_completed' => 'boolean',
  46. 'enabled' => 'boolean',];
  47. }