我是工作在我的項目通常,當我打刷新地看到,我只是在HTML頁面中做了更改,頁面顯示的左上角的「重定向到一個文本TokenMismatchException: http://localhost:8888/xxx「。它將我重定向到登錄頁面。當我點擊登錄時,'TokenMismatchException'錯誤顯示:Laravel 5.3 - 對每一個崗位請求
登錄表單具有隱藏的輸入_token,標題也有它。正如我所說的一切都很好。我一直在做這個項目2個月。這與文件權限有關嗎?
這是登錄表單。
<form class="form-horizontal" role="form" method="POST" action="{{ url('/login') }}">
{{ csrf_field() }}
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
<div class="col-md-7">
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required autofocus>
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="password" class="col-md-4 control-label">Password</label>
<div class="col-md-7">
<input id="password" type="password" class="form-control" name="password" required>
@if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Login
</button>
<a class="btn btn-link" href="{{ url('/password/reset') }}">
Forgot Your Password?
</a>
</div>
</div>
</form>
謝謝:)
你如何輸出的隱藏輸入_token? – aceraven777
我輸入令牌是這樣產生的:「」 –
就像你怎麼輸出?你使用'''{{csrf_field()}}'''? – aceraven777