User.php 978B

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