PHP code example of farukcoder / laravel-feature-heatmap

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

    

farukcoder / laravel-feature-heatmap example snippets


> Route::middleware(['web', 'auth', 'track.feature'])->group(function () {
>     Route::get('/orders', [OrderController::class, 'index']);
> });
> 

protected function schedule(Schedule $schedule): void
{
    $schedule->command('feature-heatmap:aggregate --prune')->dailyAt('01:00');
}

use Illuminate\Support\Facades\Schedule;

Schedule::command('feature-heatmap:aggregate --prune')->dailyAt('01:00');

return [
    // Enable or disable the package globally
    'enabled' => env('FEATURE_HEATMAP_ENABLED', true),

    // Automatically attach middleware to web/api routes
    'auto_track' => env('FEATURE_HEATMAP_AUTO_TRACK', true),

    // Use queues for non-blocking database writes
    'use_queue' => env('FEATURE_HEATMAP_USE_QUEUE', true),
    'queue_name' => env('FEATURE_HEATMAP_QUEUE', 'default'),

    // Retention period for raw interaction logs (in days)
    'raw_log_retention_days' => 14,

    // Excluded URIs (regex patterns)
    'excluded_patterns' => [
        '^_debugbar',
        '^horizon',
        '^telescope',
        '^feature-heatmap',
    ],

    // Dashboard route prefix & middleware
    'route_prefix' => 'feature-heatmap',
    'route_middleware' => ['web', 'auth'],

    // User model column resolution
    'user_name_column' => 'name',
    'user_email_column' => 'email',
];
bash
php artisan vendor:publish --tag=feature-heatmap-config
bash
php artisan migrate