Um pacote Laravel para registrar pedidos feitos à sua API.
Funcionalidades
Add the package to your Laravel application using composer:
composer require codetech/laravel-api-logs
The service provider will be automatically registered during the installation process. However, you can manually register it by adding it to the list of providers located in your config/app.php
file:
'providers' => [
...
Codetech\ApiLogs\Providers\ApiLogServiceProvider::class,
],
Publish the migration file:
php artisan vendor:publish --provider=CodeTech\\ApiLogs\\Providers\\ApiLogServiceProvider --tag=migrations
Run the migration:
php artisan migrate
To start logging requests made to your API, you simply add the middleware to the API's route middleware group, located in your app/Http/Kernel.php
:
use CodeTech\ApiLogs\Http\Middleware\LogApiRequest;
protected $middlewareGroups = [
...
'api' => [
...
LogApiRequest::class,
],
];
codetech/laravel-api-logs is open-sourced software licensed under the MIT license.
Visite a página do repositório no GitHub para mais informações sobre este projeto Open Source.