【发布时间】:2017-04-02 08:09:10
【问题描述】:
我使用了内置于 Auth 的 Laravel。需要改变一些路径和东西。一开始一切都很好。但我注意到我被随机注销了。 Laravel 将 mit 返回到登录页面。另外,有时当我尝试在那里登录时,可能会发生三种不同的事情,我不知道为什么:
- 页面重新加载,输入消失
- 令牌不匹配错误
- 已登录
这是我的登录视图:
<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>
可能是什么问题?
【问题讨论】:
标签: php laravel authentication