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

adityar15's avatar

Laravel keeping api logs with status

Hi,

I want to keep track of API requests as a log with status codes (200, 422, 500). I am able to handle the 422 and 500 status code APIs with App\Exceptions\Handler.php class where on error I can log the API request with the appropriate status code.

Is there any way to do it for API requests with 200 status? In other words which Laravel class/service runs on before the response is sent to the client.

0 likes
3 replies

Please or to participate in this conversation.