PHP code example of bilfeldt / laravel-request-logger
1. Go to this page and download the library: Download bilfeldt/laravel-request-logger 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/ */
bilfeldt / laravel-request-logger example snippets
Route::middleware('requestlog')->get('/', function () {
return 'Hello World';
});
// Enable all requests:
'log_methods' => ['*'],
// or enable all server errors
'log_statuses' => ['5**'],
/**
* Index posts.
*
* @param Request $request
* @return Response
*/
public function index(Request $request)
{
$request->enableLog();
//
}
Route::middleware('log:example')->get('/', function () {
return 'Hello World';
});