我遇到了如下路由問題。路線未定義。 Laravel 5.3
路由[forgotpassword/reset]未定義。
登錄forgotpassword網址
<div class="forgot-password"><a href="{{ url('/forgotpassword/reset') }}" class="small">Forgot password?</a></div>
路線碼
Route::group(['namespace' => 'Auth'], function() {
Route::get('/forgotpassword/reset', '[email protected]');
Route::post('/forgotpassword/email', '[email protected]');
Route::get('/password/reset/{token}', '[email protected]');
Route::post('/password/reset', '[email protected]');
});
ForgotPasswordController代碼
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Base\BaseController;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class ForgotPasswordController extends BaseController
{
use SendsPasswordResetEmails;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
public function showLinkRequestForm()
{
return view('password.forgotpassword');
}
}
我覆蓋函數ShowLink將視圖返回到忘記的密碼刀片。
,這裏是我的forgotPassword刀片
@extends('layout.master')
@section('content')
<div id="content" class="content">
@include('partials.breadcrumbs')
<h1 class="page-header">Change <small>password</small></h1>
@include('partials.message')
<div class="row">
<div class="col-md-12">
<div class="panel panel-inverse" data-sortable-id="ui-general-1">
<div class="panel-heading">
<h2 class="panel-title">Change Password</h2>
</div>
<div class="panel-body">
{!! Form::open(['method' => 'forgotpassword','route' => ['forgotpassword/reset']]) !!}
<div class="forgot-password-form">
@if (Session::has('message'))
<div class="col-sm-12">
<div class="alert alert-success">
{{ Session::get('message') }}
</div>
</div>
@endif
{!! csrf_field() !!}
<div class="row ct-no-margin">
<div class="col-sm-4 col-xs-12">
<div class="form-group">
<div class="{{ $errors->has('email') ? ' has-error' : '' }}">
<div class="row ct-no-margin">
<div class="col-sm-12 ct-no-padding">
<label for="">Email address</label>
</div>
<div class="col-sm-12 ct-no-padding">
<input type="email" name="email" class="form-control" required/>
</div>
@if ($errors->has('email'))
<span class="help-block error-email">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn fp-submit-btn">Submit</button>
<a href="/admin/login" class="fp-cancel-btn">Cancel</a>
</div>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
@endsection
在這方面的任何幫助將不勝感激
你可以提供'工匠路線:列表'輸出? – Anton
@Anton | POST |忘記密碼/電子郵件| | App \ Http \ Controllers \ Auth \ ForgotPasswordController @ sendResetLinkEmail | web,guest | | | GET | HEAD |忘記密碼/重置| | App \ Http \ Controllers \ Auth \ ForgotPasswordController @ showLinkRequestForm |網絡,客人 –