PHP code example of panphp / pan

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

    

panphp / pan example snippets


Action::make('subscribe')
    ->extraAttributes(['data-pan' => 'subscribe-button'])

use Filament\Actions\Action;

public function boot(): void
{
    Action::configureUsing(function (Action $action): void {
        $action->extraAttributes(fn () => ['data-pan' => $action->getLabel()]);
    });
}

use Pan\PanConfiguration;

public function register(): void
{
    PanConfiguration::allowedAnalytics([
        'tab-profile',
        'tab-settings',
    ]);
}

PanConfiguration::maxAnalytics(10000);

PanConfiguration::unlimitedAnalytics();

PanConfiguration::routePrefix('internal-analytics');
bash
php artisan install:pan
bash
php artisan pan
php artisan pan --filter=tab-profile
bash
php artisan pan:flush
bash
php artisan pan:delete <id>