The web middleware is by default loaded for ebery route in the app/Http/routes.php file. If you create an API, you mostly don't need all the things this web middleware is loading, like cookie sessions and CRSF protection. To create routes for the API: Create a new app/Http/routes-api.php file and add the routes for the API. […]