Install Laravel DebugBar and check if there are some obvious issues like N+1, or too many hydrated models and so on. If that does not give you any clues, then profile your app and that will give you definite answer where your app is causing issues.
How to make my Laravel API project with Passport faster?
I'm developing a Laravel API based on larapi project and I think I'm doing something wrong, because every request to my API takes about 3 seconds to return, don't matter the size of the response.
I've searched a lot and already tried to run the following commands, but my requests still slow:
composer dump-autoload -o php artisan cache:clear php artisan route:clear php artisan config:clear php artisan view:clear
My server and database server are hosted separatedly. I already did some tests with other projects and the servers runs fast. It seems to be a problem with Passport (Laravel OAuth authentication), it try to authenticate the user's access token on every request.
Has anyone faced this problem?
Thanks for your attenion. Regards.
Please or to participate in this conversation.