我想将Laravel Voyager Admin Panel用作我的Laravel Vue Spa项目的后端,但它会不断抛出此auth错误。我正在为Vue Spa项目使用带有保护jwt
的默认驱动程序api
。
InvalidArgumentException
Auth driver [jwt] for guard [api] is not defined.
at C:\laragon\www\laravel-vue-spa\vendor\laravel\framework\src\Illuminate\Auth\AuthManager.php:97
93| if (method_exists($this, $driverMethod)) {
94| return $this->{$driverMethod}($name, $config);
95| }
96|
> 97| throw new InvalidArgumentException(
98| "Auth driver [{$config['driver']}] for guard [{$name}] is not defined."
99| );
100| }
101|
1 C:\laragon\www\laravel-vue-spa\vendor\laravel\framework\src\Illuminate\Auth\AuthManager.php:68
Illuminate\Auth\AuthManager::resolve("api")
2 C:\laragon\www\laravel-vue-spa\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:261
Illuminate\Auth\AuthManager::guard("api")
请问有没有一种方法可以解决此错误?我已经尝试了所有可以在google上找到的答案,但没有人起作用。