Admin.php 975 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. use Tymon\JWTAuth\Contracts\JWTSubject;
  9. class Admin extends Authenticatable implements JWTSubject
  10. {
  11. use HasApiTokens, HasFactory, Notifiable;
  12. /**
  13. * The attributes that are mass assignable.
  14. *
  15. * @var array<int, string>
  16. */
  17. protected $table='admins';
  18. public function getJWTIdentifier()
  19. {
  20. return $this->getKey();
  21. }
  22. public function getJWTCustomClaims()
  23. {
  24. return [];
  25. }
  26. /**
  27. * The attributes that should be hidden for serialization.
  28. *
  29. * @var array<int, string>
  30. */
  31. protected $hidden = [
  32. 'password',
  33. ];
  34. /**
  35. * The attributes that should be cast.
  36. *
  37. * @var array<string, string>
  38. */
  39. }