laraflow / backpack-api-log
Backpack API Log is a database oriented api request and response logger for backpack admin panel
Requires
- php: ^7.4|^8.1
- ext-json: *
- backpack/crud: ^5.0.4
- illuminate/contracts: ^8.0|^9.0|^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
Suggests
- backpack/pro: backpack pro will add addentional filter options to list view
This package is auto-updated.
Last update: 2024-10-09 12:00:59 UTC
README
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
composer require laraflow/backpack-api-log
You can run complete installation with:
php artisan backpack-api-log:install php artisan migrate
Optionally, Install command will publish config and migration. For others, you can publish the config & migration file with:
php artisan vendor:publish --tag="api-log-config" php artisan vendor:publish --tag="api-log-migration"
This is the contents of the published config file:
return [ 'table' => 'api_logs', 'model' => \Laraflow\BackpackApiLog\Models\BackpackApiLog::class, 'route' => 'api-log', 'enabled' => env('BACKPACK_API_LOG', false), 'logs' => [ //which methods should be logged 'method' => [ 'GET' => 'GET', 'POST' => 'POST', 'PUT' => 'PUT', 'PATCH' => 'PATCH', 'DELETE' => 'DELETE', 'OPTION' => 'OPTION', ], //which api endpoints should be logged 'host' => [ // ], //which api http status code should be logged 'code' => [ '200' => '200', '400' => '400', '500' => '500', '404' => '404', '422' => '422', '419' => '419', ], ], ];
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.