PHP code example of dniccum / laravel-request-logs
1. Go to this page and download the library: Download dniccum/laravel-request-logs 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/ */
dniccum / laravel-request-logs example snippets
return [
/*
|--------------------------------------------------------------------------
| Table Name
|--------------------------------------------------------------------------
|
| The name of the table that will store the log entries.
|
*/
'table_name' => 'request_logs',
/*
|--------------------------------------------------------------------------
| History
|--------------------------------------------------------------------------
|
| The number of days of logs that you would like to keep in the database
| at any time.
|
*/
'history' => env('LOGGING_HISTORY', 21),
/*
|--------------------------------------------------------------------------
| Remove Bearer Token
|--------------------------------------------------------------------------
|
| Enable if you would like to remove the bearer authentication token from
| the request header.
|
*/
'remove_bearer' => env('LOGGING_REMOVE_BEARER', true),
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
...
'route-logging' => \Dniccum\LaravelRequestLogs\Http\Middleware\RequestLogging::class
];