Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

armanyum's avatar

Laravel api not working

I have a scenario where I am calling a route inside my api but it just sends an error after some time of Maximum execution time of 60 seconds exceeded I am using HTTP facade to hit broadcasting/auth route, the request method is POST just to clarify, I did increase the max time in my php.ini but that's not the issue, it just sends the error

0 likes
4 replies
Snapey's avatar

You are calling an endpoint within the same application?

You are using php artisan serve as your webserver?

1 like
Snapey's avatar

@armanyum first off, there is never a good reason to call your own API unless testing.

Calling your own service requires two concurrent http requests and php's built in web server only supports a single connection so hangs waiting for itself to finish so that it can service the API call, which of course will never happen.

armanyum's avatar

@Snapey the reason I am doing this is that I am using Laravel reverb and my client app is unable to connect with it because it sends a post request to broadcasting/auth and it fails to authorize as my browser is not sending any cookies in the request, I tried many approaches to handle that but it just would not send cookies in header, so I am trying to hit my custom url and from there I want to call the broadcasting/auth route, get authorized and send the response back to client, any suggestions on how can I achieve that

Please or to participate in this conversation.