Pulling my hair out with this one.

I have an API that is working completly in both staging and production environments but recently has started return some 404 on two of the routes locally, and I cant work out why. (No changes have been made to the site locally).

Below is the affected route group:

```
Route::group(['middleware' => ['api.auth']], function () {

Route::post('role_update', 'App\Http\Controllers\MobileApi@role_update');
Route::post('request_items', 'App\Http\Controller\MobileApi@request_items');
Route::post('download_log', 'App\Http\Controllers\MobileApi@download_log');
Route::post('log_time', 'App\Http\Controllers\MobileApi@log_time');
Route::post('log_search', 'App\Http\Controllers\MobileApi@log_search');

});

```

The role\_update & log\_time routes return 404 locally and run perfectly in production and in the staging environment.

All of these routes are shown as generated on route:list.

I have run route:clear & route:cache & route:optimize to no beneficial effect.

I know that the methods are rechable on the controller and that the middleware isnt the issue as if I use one of the working routes URI's to call one of the non working route methods it works. For example, if I switch things around so that a post to download\_log actually points to the role\_update method the 404 disappears.

Interestingly I cannot change the URI's of any of these routes or they immediatly start throwing 404's even when confirmed that they are registered in route:list. I also can't add any new routes as they all throw 404's.

This makes me suspicious that the routes are being cached and not overridden somewhere?

My local environment is laravel sail - there has been no updates between this working and not working.

Laravel version - 8.30.1

Any help with this would be greatly appretiated.

Thanks

N.B - we have also just noticed that the role\_update route is actually returning a 404 on the production and staging servers but only from our android application - its working on both iOS and postman. Very odd.