As always, we need to pull in some dependencies through Composer.
composer require rawphp/laravel-communication-logger
RawPHP\LaravelCommunicationLogger\CommunicationLoggerProvider::class,
Add the CommunicationLog middleware to the Kernel middleware array. This allows all requests and responses to be logged.
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
CommunicationsLog::class,
],
];
php artisan vendor:publish --provider="RawPHP\LaravelCommunicationLogger\CommunicationLoggerProvider"