User.php 982 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace App\Models\Member;
  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. use Spatie\Permission\Traits\HasRoles;
  8. class User extends Authenticatable
  9. {
  10. use HasApiTokens, HasFactory, Notifiable;
  11. protected $table = 'member_users';
  12. /**
  13. * The attributes that are mass assignable.
  14. *
  15. * @var array<int, string>
  16. */
  17. protected $fillable = [];
  18. protected $guarded = [];
  19. /**
  20. * The attributes that should be hidden for serialization.
  21. *
  22. * @var array<int, string>
  23. */
  24. protected $hidden = [
  25. 'password'
  26. ];
  27. /**
  28. * Get the attributes that should be cast.
  29. *
  30. * @return array<string, string>
  31. */
  32. protected function casts(): array
  33. {
  34. return [
  35. 'password' => 'hashed',
  36. 'login_date' => 'datetime'
  37. ];
  38. }
  39. }