PHP code example of jezzdk / laravel-request-log

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

    

jezzdk / laravel-request-log example snippets


return [

    /**
     * Enable the request log (default is false).
     */
    'enabled' => env('REQUEST_LOG_ENABLED', false),

    /**
     * Max age in days.
     *
     * Entries older than this will be deleted by the scheduled task.
     */
    'max_age' => 90,

    /**
     * The model used for storing the request data.
     *
     * You might want to override this if you're using a multi-tenancy package,
     * or if you want to store other data.
     */
    'model' => Jezzdk\LaravelRequestLog\RequestLog::class,

];

// app/Http/Kernel.php
protected $middleware = [
    ...
    \Jezzdk\LaravelRequestLog\Middleware\LogRequest::class
]

// app/Console/Kernel.php

$schedule->command('request-log:clean')->daily();
bash
php artisan vendor:publish --provider="Jezzdk\LaravelRequestLog\RequestLogServiceProvider" --tag="migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="Jezzdk\LaravelRequestLog\RequestLogServiceProvider" --tag="config"