User.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Contracts\Auth\MustVerifyEmail;
  4. use Illuminate\Database\Eloquent\Casts\Attribute;
  5. use Illuminate\Database\Eloquent\Factories\HasFactory;
  6. use Illuminate\Foundation\Auth\User as Authenticatable;
  7. use Illuminate\Notifications\Notifiable;
  8. use Laravel\Sanctum\HasApiTokens;
  9. class User extends Authenticatable implements MustVerifyEmail
  10. {
  11. use HasApiTokens, HasFactory, Notifiable;
  12. /**
  13. * The attributes that are mass assignable.
  14. *
  15. * @var array<int, string>
  16. */
  17. protected $fillable = [
  18. 'name',
  19. 'phone',
  20. 'email',
  21. 'status',
  22. 'password',
  23. 'gender_id',
  24. 'role_id',
  25. 'outlet_id',
  26. ];
  27. /**
  28. * The attributes that should be hidden for serialization.
  29. *
  30. * @var array<int, string>
  31. */
  32. protected $hidden = [
  33. 'password',
  34. 'remember_token',
  35. ];
  36. /**
  37. * The attributes that should be cast.
  38. *
  39. * @var array<string, string>
  40. */
  41. protected $casts = [
  42. 'email_verified_at' => 'datetime',
  43. ];
  44. }