How to debug Rest APIs in Laravel | Laravel API Debugger

Опубликовано: 01 Октябрь 2024
на канале: Laravel Package Tutorial
4,802
24

Package: https://github.com/mlanin/laravel-api...

When you are developing JSON API sometimes you need to debug it, but if you will use dd() or var_dump() you will break the output that will affect every client that is working with your API at the moment. Laravel API Debugger is made to provide you with all your debug information and doesn’t corrupt the output.

The debugger’s two main tasks are to collect your SQL queries and dump variables.
The debugger can provide you with all SQL queries that were fired during the request.

It will listen to the illuminate query event and add queries to the output.

It will add queries log ONLY when you set APP_DEBUG=true. So you don’t have to worry that someone will see your queries on production.

Like Facebook Page:   / laravelpackagetutorial  
Join Facebook Group:   / 576525202944819  

Please Like and Subscribe. This will really boost my confidence and encourage me to make more and more videos.

Thanks
Shailesh Ladumor