Laravel 6.PHP 7.4。我正在建立一个网站。由于 Laravel 提供了默认的身份验证登录和注册表单。我将登录表单放入导航中,而将注册表单放在注册页面上。现在我想让用户在注册页面上提供另一个登录表单。我设计了另一个登录表单,在提交时我将其引用到相同的登录路线,但它不起作用。错误是 419 页已过期。我还阅读了有关 MutiAuth 的内容,但这是我将用于我的管理面板的内容。有什么解决办法吗?注册.blade<form method="post" action="{{ route('login') }}" onsubmit="if(document.getElementById('agreed').checked) { return true; } else { alert('Please indicate that you have read and agree to the privacy policy and terms of use'); return false; }"> <div class="input-group form-group"> <div class="input-group-prepend"> <span class="input-group-text"><i class="fas fa-user"></i></span> </div> <input type="email" required name="email" class="form-control" placeholder="email address"> </div> <div class="input-group form-group"> <div class="input-group-prepend"> <span class="input-group-text"><i class="fas fa-key"></i></span> </div> <input type="password" required name="password" class="form-control" placeholder="password"> </div> <div class="form-group"> <input type="checkbox" name="checkbox" value="check" id="agreed" /> <small>I agree to the privacy policy and terms of use</small> </div> <div class="form-group"> <input type="submit" value="Login" class="btn float-right login_btn"> </div> </form> 路线Route::get('login', [ 'as' => 'login', 'uses' => 'Auth\LoginController@showLoginForm']);
添加回答
举报
0/150
提交
取消