/laravel-api-logger

laravel-api-logger

Primary LanguagePHP

Laravel API Logger

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.

screenshot

Installation

  1. Install the package via composer
composer require tmdan/laravel-api-logger

Usage

  1. Publish the config file with:
php artisan vendor:publish --provider="Tmdan\ApiLogger\Providers\ApiLoggerServiceProvider"
  1. Run commands:
php artisan migrate
  1. Add to your .env file:
API_LOGGER_ENABLED=true
  1. Done!