laravel/passport 设置守卫passport ,分表登录提示Method Illuminate\\Auth\\RequestGuard::attempt does not exist.

1. 运行环境

1). 当前使用的 Laravel 版本?

8.*

2). 当前使用的 php/php-fpm 版本?

PHP 版本:7.3
希望得到解决方案
问题描述:laravel分表登录,通过laravel/passport获取token
正确输入用户名密码后,请求登录接口报错:

{
    "message": "Method Illuminate\\Auth\\RequestGuard::attempt does not exist.",
    "exception": "BadMethodCallException",
    "file": "E:\\PHP\\phpEnv\\www\\lara-admin\\vendor\\laravel\\framework\\src\\Illuminate\\Macroable\\Traits\\Macroable.php",
    "line": 113,
    "trace": [
        {
            "file": "E:\\PHP\\phpEnv\\www\\lara-admin\\app\\Http\\Controllers\\Admin\\LoginController.php",
            "line": 15,
            "function": "__call",
            "class": "Illuminate\\Auth\\RequestGuard",
            "type": "->"
        }
    ]
}

设置的auth.php

laravel/passport 设置守卫passport ,分表登录提示Method Illuminate\\Auth\\RequestGuard::attempt does not exist.
分表模型:

laravel/passport 设置守卫passport ,分表登录提示Method Illuminate\\Auth\\RequestGuard::attempt does not exist.
登录方法:

laravel/passport 设置守卫passport ,分表登录提示Method Illuminate\\Auth\\RequestGuard::attempt does not exist.

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 1

谢谢了。我自己在找找看吧

1年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!