【发布时间】:2018-09-20 17:28:51
【问题描述】:
我最近在 laravel 开始了一个新项目。
一切都很顺利,但我遇到了问题。
我在我的项目中设置了 laravel 的内置身份验证。
我有一个忘记密码链接,用于通过电子邮件发送重置密码链接。
每当我打开该链接时,用于密码重置的自定义视图都会无限次呈现。
代码:
@extends('layouts.app')
@section('content')
<div class="middle-box text-center loginscreen animated fadeInDown">
<div>
<div>
<h1 class="logo-name">ABC</h1>
</div>
<h3>Welcome to ABC Admin</h3>
<p>Reset your password.</p>
<form class="m-t" role="form" method="POST" action="{{ route('password.request') }}">
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
{{ csrf_field() }}
<input type="hidden" name="token" value="{{ $token }}">
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<input id="email" type="email" class="form-control" placeholder="Email" name="email" value="{{ old('email') }}" required autofocus>
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<input id="password" type="password" class="form-control" placeholder="Password" name="password" required>
@if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<input id="password-confirm" type="password" class="form-control" placeholder="Confirm Password" name="password_confirmation" required>
@if ($errors->has('password_confirmation'))
<span class="help-block">
<strong>{{ $errors->first('password_confirmation') }}</strong>
</span>
@endif
</div>
<button type="submit" class="btn btn-primary block full-width m-b">Reset Password</button>
</form>
<p class="m-t"> <small>© Copyright {{ date('Y') }}. All rights reserved by ABC.</small> </p>
</div>
</div>
@endsection
【问题讨论】:
-
你能贴一张它的截图吗?我不明白页面如何无限渲染 # 次
标签: php laravel laravel-5.6 laravel-blade