Blade 查看无限次渲染

Blade view rendering infinity times

我最近在 laravel 开始了一个新项目。

一切顺利,但我 运行 遇到了问题。

我在我的项目中设置了 laravel 的 built-in 身份验证

忘记了密码 link 需要通过电子邮件发送重置密码link。

每当我打开 link 密码重置的自定义视图时,都会无限次地呈现。

代码:

@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>&copy; Copyright {{ date('Y') }}. All rights reserved by ABC.</small> </p>
        </div>
    </div>
@endsection

我已经解决了,因为模板中有一个js文件 包含一个代码以包含一个无法包含的演示 html 文件。 那个js错误导致了整个问题。谢谢 @IamCavic 抽出时间。