User.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. 'master_user_id',
  28. ];
  29. /**
  30. * The attributes that should be hidden for serialization.
  31. *
  32. * @var array<int, string>
  33. */
  34. protected $hidden = [
  35. 'password',
  36. 'remember_token',
  37. ];
  38. /**
  39. * The attributes that should be cast.
  40. *
  41. * @var array<string, string>
  42. */
  43. protected $casts = [
  44. 'email_verified_at' => 'datetime',
  45. 'first_login_at' => 'datetime',
  46. 'first_login_completed' => 'boolean',
  47. 'enabled' => 'boolean',];
  48. }