I'm trying to set up a Laravel API but somehow every time I try to use get I get the following error:
Session store not set on request.
It works when I place it out side of the (api) middleware but in that case no authentication would be needed. With post it works perfectly but somehow when I use get I keep getting the error.
This what I have in my routes/api.php:
Route::middleware('auth:api')->group(function () {
Route::get('/test', function (Request $request) {
return 'test';
});
});
PHP version: 7.2.9
Laravel version: 5.6.17
Homestead version: 6.3.0
This is specificly in the auth:api middleware which makes it different from