Streamlining API Versioning in Laravel: A Smart Approach to Route Inheritance and Overrides
A new Laravel install has several route files. The two most widely used route files are routes/web.php and route/api.php. As their names imply, these are for web (browser) routes and API related routes. In this post we’re only going to be looking at the API route. Let’s assume that we have a GET endpoint to get a list of all users in our API. We could do this simply in the route file (typically we’d set up controllers etc but…