Where have you created the route?
Inside of the web.php
file, try to create your routes within the
Route::group(['middleware' => ['web']], function () {
//routes here
}
statement.
You may need to clear the route cache too
php artisan route:cache
From the docs: https://laravel.com/docs/5.5/middleware
Out of the box, Laravel comes with web and api middleware groups that
contains common middleware you may want to apply to your web UI and
API routes:
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
'throttle:60,1',
'auth:api',
],
];