This is a small package that can helps in debugging api logs. It can log request method, url, request payload, which models are retrieved, controller and method.
- Install the package via composer
composer require tmdan/laravel-api-logger
- Publish the config file with:
php artisan vendor:publish --provider="Tmdan\ApiLogger\Providers\ApiLoggerServiceProvider"
- Run commands:
php artisan migrate
- Add to your .env file:
API_LOGGER_ENABLED=true
- Done!