Laravel - 错误重置密码控制器在路由列表中找不到



我在执行命令时遇到此错误php artisan route:list

ReflectionException  : Class AppHttpControllersAuthResetPasswordController does not exist
at /Applications/MAMP/htdocs/test/vendor/laravel/framework/src/Illuminate/Container/Container.php:790

我在哪里可以查看?我使用php artisan make:auth生成此文件。
该文件存在于app/Http/Controllers/Auth/ResetPasswordController.php下。

这是内容:

<?php
namespace AppHttpControllersAuth;
use AppHttpControllersController;
use IlluminateFoundationAuthResetsPasswords;
class ResetPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
use ResetsPasswords;
/**
* Where to redirect users after resetting their password.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}

路由被缓存,不会获得文件的新版本/类

所以你需要通过运行将它们添加到类映射中

composer dumpautoload

希望这有帮助

相关内容

  • 没有找到相关文章

最新更新