2
我使用Auth中構建的Laravels。需要改變一些路徑和東西。一切在一開始就運行良好。但我注意到我會隨機註銷。 Laravel將mit返回到登錄頁面。另外,有時,當我嘗試登錄有,三種不同的事情都可能發生,我不知道爲什麼:Laravel自動註銷並且有時令牌不匹配
- 頁面重新加載,輸入了
- 令牌不匹配錯誤
- 已登錄
這是我的登錄視圖:
<form class="form-horizontal" role="form" method="POST" action="{{ url('/backend/login') }}">
{{ csrf_field() }}
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" class="col-md-4 control-label">@lang('admin/login.mail')</label>
<div class="col-md-12">
<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">@lang('admin/login.password')</label>
<div class="col-md-12">
<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-2 col-md-offset-5">
<button type="submit" class="btn btn-primary">
Login
</button>
</div>
</div>
</form>
可能是什麼問題?