JWTAuth.php 336 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\api\service;
  3. use Lettered\Support\Auth;
  4. /**
  5. * 自定义实现
  6. */
  7. class JWTAuth extends Auth
  8. {
  9. /**
  10. * 重现登录方法
  11. * @param $user
  12. *
  13. * @return mixed|void
  14. */
  15. public function attempt($user)
  16. {
  17. return $this->{$this->getDriver()}($user);
  18. }
  19. }