任何人都知道为何路由“/ password/email”在生产服务器上返回404 Not Found错误,但适用于本地?Laravel 5 - 无法在生产服务器上重置密码404 - 未找到
当用户试图通过电子邮件(https://compariimobiliare.ro/password/reset)重置密码时,POST URL https://compariimobiliare.ro/password/email会给出404 Not Found错误。相同的URL在本地服务器上正常工作,但不在生产中。
路线是存在的,我能看到它,当我运行命令:
php artisan route:list
POST | password/email | | App\Http\Controllers\Auth\[email protected] | web,guest
Laravel默认的实现:
public function sendResetLinkEmail(Request $request)
{
$this->validate($request, ['email' => 'required|email']);
// We will send the password reset link to this user. Once we have attempted
// to send the link, we will examine the response then see the message we
// need to show to the user. Finally, we'll send out a proper response.
$response = $this->broker()->sendResetLink(
$request->only('email')
);
if ($response === Password::RESET_LINK_SENT) {
return back()->with('status', trans($response));
}
// If an error was returned by the password broker, we will get this message
// translated so we can notify a user of the problem. We'll redirect back
// to where the users came from so they can attempt this process again.
return back()->withErrors(
['email' => trans($response)]
);
}
你可以在控制器'ForgotPasswordController'中显示'sendResetLinkEmail'方法的代码吗? – KuKeC