Download the PHP package always-open/laravel-request-logger without Composer
On this page you can find all versions of the php package always-open/laravel-request-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download always-open/laravel-request-logger
More information about always-open/laravel-request-logger
Files in always-open/laravel-request-logger
Package laravel-request-logger
Short Description Micro-package to ease the effort to log HTTP requests made from your application
License MIT
Homepage https://github.com/always-open/laravel-request-logger
Informations about the package laravel-request-logger
Laravel Request Logger
When making HTTP requests to external APIs it is valuable to track each request and its response. This insight can help you find issues, track usage, and reuse responses for testing/development.
Installation
You can install the package via composer:
Configuration
Running the above command will publish the config file.
Usage
Creation
To add logs to your system you must first create the migration and model for the appropriate log. This is done by using
the packages request-logger:make-table
command.
The command needs the name of the item to be tracked and it will be used for naming the model and table.
Example
This will create a model \App\Models\FacebookRequestLog
and a migration to create the table facebook_request_logs
Implementation
Then you can use that model to create logs of your requests where you can make the API calls.
Example
Guzzle
You can also manually set each property and then save the log instance.
Testing
Using Docker
All assets are set up under the docker-compose.yml file. The first time you run the docker image you must build it with the following command:
Then you can bring it up in the background using:
From there you can run the tests within an isolated environment
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email @qschmick instead of using the issue tracker.
Credits
- Quentin Schmick
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-request-logger with dependencies
always-open/laravel-process-stamps Version ^5.0|^6.0|^7.0
guzzlehttp/guzzle Version ^7.4
laravel/framework Version ^8.0|^9.0|^10.0