419页在登记表上过期

时间:2019-09-24 21:40:06

标签: laravel

我有两个使用表单登录和注册的divs.login可以正常工作,但是register使我的错误页面过期了,我什至添加了@csrf但它仍然无法正常工作,但它可以在登录表单上正常工作

<form action="{{route('register')}}" method="POST">
    @csrf
    <div class="textbox">
        <i class="icon-user"></i>
        <input type="name" placeholder="Username" name="name" class="inputs">
    </div>
    <input type="hidden" name="_token" value="{{ csrf_token() }}">
    <div class="textbox">
        <i class="icon-lock"></i>
        <input type="password" placeholder="Password" name="password" class="inputs" autocomplete="new-password">
    </div>

    <div class="textbox">
        <i class="icon-lock"></i>
        <input type="password" placeholder="confirm password" name="password_confirmation" value="" class="inputs">
    </div>
    <div id="terms"><input type="checkbox"> I have read and agreed to the <a href="">terms and conditions</a></div>

    <input type="submit" value="Register" class="submit-buttons">
</form>

1 个答案:

答案 0 :(得分:1)

删除以下行之一:

<input type="hidden" name="_token" value="{{ csrf_token() }}">

@csrf