JWTAuth.php 361 B

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