JWTAuth.php 361 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace app\seller\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. halt($user);
  18. return $this->{$this->getDriver()}($user);
  19. }
  20. }