Yeah, that won't work. Go to your app/providers/RouteServiceProvider.php file and update it however you need:
protected function mapWebRoutes(Router $router)
{
$router->group([
'namespace' => $this->namespace, 'middleware' => 'web',
], function ($router) {
require app_path('Http/routes.php');
});
}
Two options, maybe:
- Just remove the
'middleware' => 'web'block entirely and continue like you used to. - Add a whole new
$router->group()section that loads, say,Http/routes-api.php.