PHP code example of roman444uk / laravel-apilogger

1. Go to this page and download the library: Download roman444uk/laravel-apilogger library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

roman444uk / laravel-apilogger example snippets


//in route.php or web.php
Route::middleware('apilogger')->post('/test',function(){
    return response()->json("test");
});

'route'          => [
    'prefix'     => 'apilogs',
    'middleware' => null,//Can be change to ['auth'] or others
]
bash
php artisan vendor:publish --tag=config --provider="RMN\Providers\ApiLogServiceProvider"
bash
php artisan migrate
bash
php artisan apilog:clear