Why Laravel Empty Api endpoints taking 1.5 seconds
Why my simple API call with no queries and no data takes ~1.5 seconds?
I cached routes, config and ran php artisan optimize
I tried looking in the timeline of the request in https://github.com/itsgoingd/clockwork
it shows the total time of 1589 ms.
The controller takes 87ms. (Weird thing is I don't even controller)
I am just returning an empty array from routes/api.php
Can someone shed some light on what could be going on?
Are any (weird) middlewares registered for your API routes inside your App\Http\Kernel or App\Providers\RouteServiceProvider that query your database? Did you try creating a fresh Laravel app to see if the problem is related to your specific app?