I'm using Laravel 5.2 and doing all authentication manually. So, although everything works, but I get a token mismatch
error and the reason is that I'm not passing my routes through the web
middleware in my routes file:
Route::group(['middleware'=>['web']],function (){
Route::get('/', function () {
return view('welcome');
})->name('home');
});
Route::social();
where Route::social();
is
public function social() {
$this->post('/signup',['uses'=>'UserController@postSignUp','as'=>'signup']);
$this->post('/signin',['uses'=>'UserController@postSignIn','as'=>'signin']);
$this->get('/dashboard',function() {
return view('dashboard');
})->middleware('auth');
}
But if I move Route::social();
to the web middleware group, it doesn't count errors and so return empty errors even if there are. How do I get around with it? I want both things!
I've the token field in my form using {!! Form::token() !!}