php - 未找到 HTTP 异常 - 在 Laravel 中以及如何使用自己的方法重置密码
问题描述
我正在尝试实现重置密码功能,但我收到错误未找到 http 异常,我想实现我自己的密码重置方法,但我使用 laravel 自己的功能,但我无法解决这个解决方案我还附上了我的屏幕截图:
我的控制器:
class ResetPasswordController extends Controller
{
use ResetsPasswords;
/**
* Create a new password controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
public function getSendResetLinkEmailSuccessResponse()
{
return View::make('auth.passwordSent');
}
protected $redirectPath = '/';
}
我的表格:
<form action="/password/reset" method="post">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="form-group">
<label for="login-form-email">E-mail</label>
<input type="email" name="email" id="email" class="form-control" tabindex="1" placeholder="Email" value="{{ old('email') }}">
</div>
<div class="form-group">
<label for="login-form-password">New password</label>
<input type="password" class="form-control" name="password" id="login-form-password" tabindex="2" placeholder="Password" tabindex="4">
</div><!-- /.form-group -->
<div class="form-group">
<label for="login-form-password-retype">Confirm new password</label>
<input type="password" class="form-control" name="password_confirmation" id="login-form-password-retype" tabindex="3" placeholder="Confirm password">
</div><!-- /.form-group -->
<div class="form-group">
<input type="submit" class="btn btn-primary pull-right" name="reset-confirm" id="reset-confirm" tabindex="4" value="Reset Password">
</div>
</form>
当我收到电子邮件时,我的电子邮件页面查看页面:
<html>
<head>
<title>Welcome Email</title>
</head>
<body>
<h2>Hello {{$user['first_name']}}</h2>
<br/>
You are receiving this email because we received a password reset request for your account.
<br/>
<a href="{{url('/password/reset', $user->reset_token)}}">Reset
Password</a>
<br />
<p>If you did not request a password reset, no further action is required.<br />Regards,<br /><strong>Triple R Lense</strong></p>
</body>
</html>
和我的路线:
Route::get('/password/reset/{token}', 'Auth\ResetPasswordController@showResetForm');
Route::post('/password/reset', 'Auth\ResetPasswordController@reset');
您的帮助将不胜感激?
解决方案
推荐阅读
- python - 作为初学者学习 Python 的前 10 个库是什么?
- html - 详情标签能否在摘要内容旁边显示其垂直内容?
- javascript - 无法从 php jquery 页面提交数据,将数据发布到另一个页面
- python - 传递的所有对象都没有与熊猫连接错误
- php - 使用Symfony中的Process获取退出码(一)Error输出中的Error和Output
- java - 如何从 Native SQL 中读取具有多个字段的 SQL
- django - 尝试创建一种有效的方法来产生具有组合结果的交叉连接
- sql - 出现错误:SqlException (0x80131904):子查询返回超过 1 个值 - 为什么?
- javascript - ag-grid 的主详细信息中的 CellValueChanged 事件
- cloud-foundry - 获取错误子域未映射到有效的身份区域,了解如何在 K8s 上定义此类区域