PHP code example of roky / laravel-route-analytics

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

    

roky / laravel-route-analytics example snippets


return [
    'enabled' => true,                  // Enable/disable tracking
    'driver' => 'database',             // Storage driver
    'table' => 'route_analytics',       // Database table name
    'middleware' => ['web'],            // Dashboard middleware
    'path' => 'route-analytics',        // Dashboard path
];

'middleware' => ['web', 'auth'],
bash
php artisan route:analytics:report
bash
php artisan route:analytics:report --unused
bash
php artisan route:analytics:report --slow=200
bash
php artisan route:analytics:flush
bash
php artisan route:analytics:prune --days=90
bash
php artisan vendor:publish --tag=route-analytics-config