Php laravel路由[resetPassword]未定义

Php laravel路由[resetPassword]未定义,php,email,laravel,Php,Email,Laravel,我在我的应用程序中设置了一个重置密码,所以我发送了一封电子邮件,当我点击链接时,我收到了这个错误 ErrorException Route [resetPassword] not defined. (View:C:\wamp\www\happy_Road\app\views\resetPassword.blade.php) 这是电子邮件链接 http://localhost/happy_Road/public/index.php/resetPassword/3a62d9105691fb0f09

我在我的应用程序中设置了一个重置密码,所以我发送了一封电子邮件,当我点击链接时,我收到了这个错误

ErrorException
Route [resetPassword] not defined. (View:C:\wamp\www\happy_Road\app\views\resetPassword.blade.php)
这是电子邮件链接

http://localhost/happy_Road/public/index.php/resetPassword/3a62d9105691fb0f09084ffdec7e87bcb9e734c0.
路线呢

Route::get('resetPassword/{token}', function($token)
{
   return View::make('resetPassword')->with('token', $token); 
});

那么问题出在哪里呢

路由本身没有问题,问题是您正试图链接到刀片文件(
resetPassword.blade.php
)中的路由,但尚未为路由指定名称

请看一下文档

这是您需要做的:

Route::get('resetPassword/{token}', ['as' => 'resetPassword', function($token)
{
   return View::make('resetPassword')->with('token', $token); 
}]);

或者也可以这样做

 Route::get('resetPassword/{token}', function($token)
 {
    return View::make('resetPassword')->with('token', $token);

 })->name('resetPassword');