PHP code example of usmonaliyev / laravel-route-logger

1. Go to this page and download the library: Download usmonaliyev/laravel-route-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/ */

    

usmonaliyev / laravel-route-logger example snippets


Route::middleware("laravel-route-logger")->get("get-foo", [FooController::class, "getFoo"]);



return [
    "path" => "../storage/logs/",
    "file" => 'laravel-route-logger.log',
    "format" => "status_message status client_ip method path_info error_message {'request':[],'response': []} execution_time auth_id user_agent now\n"
];
bash
php artisan vendor:publish --provider="Usmonaliyev\LaravelRouteLogger\LaravelRouteLoggerServiceProvider"