当我尝试重置用户密码时,一旦表单填写并发布到/ password / email
,我就会遇到致命错误我正在运行Laravel 5.2
Container.php第738行中的ReflectionException: 类auth.password不存在
我的所有观点都已到位,并且数据库中存在password_resets。
注意:此致命错误仅在用户填写“重置密码电子邮件表单”并点击提交时发生。
这是密码控制器,它是一个库存控制器。
<?php
namespace App\Http\Controllers\Auth;
use Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class PasswordController 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;
/**
* Create a new password controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
更新:路线
Route::controllers([
'password' => 'Auth\PasswordController',
]);
答案 0 :(得分:1)
这就是你如何做到的
<强> routes.php文件强>
Github
答案 1 :(得分:0)
似乎缺少auth,你可以简单地运行这个命令:
php artisan make:auth