尝试对用户进行身份验证。我输入代码并执行文档编制等步骤,但出现了错误。这是我的表单
输入代码
{!! csrf_field() !!}
First Name Last Name E-mail Address Sport: {{ $gametype }}>
@foreach($games as $game)
<input type="checkbox" value="{{ old('game_type_id') }}"> {{ $game->name }}>
@endforeach
密码密码确认我同意使用条款注册注册或连接连接已经有一个帐户?登录!
This is route://Authentication routes…
Route::get('auth/login', 'Auth'AuthController@getLogin');
Route::post('auth/login', 'Auth'AuthController@postLogin');
Route::get('auth/logout', 'Auth'AuthController@getLogout');
//注册路由…
Route::get('auth/register', 'Auth'AuthController@getRegister');
Route::post('auth/register', 'Auth'AuthController@postRegister');
我的文件登录和注册刀片在view/auth文件夹。当我注册得到这个错误TokenMismatchException在VerifyCsrfToken.php行53:
根据这里的官方文档,您必须使用当前令牌的输入字段。
<input type="hidden" name="_token" value="{{csrf_token()}}" />
和使用Route::controller('auth','AuthController');
代替所有当前的路由