PHP code example of simba-jirira-source / laravel-analytics

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

    

simba-jirira-source / laravel-analytics example snippets


'enabled' => true,

'tracking' => [
    'traffic' => true,
    'errors' => true,
],

'ip_banning' => [
    'enabled' => false,
],

'dashboard' => [
    'enabled' => true,
    'authorization' => 'viewAnalyticsDashboard',
    'middleware' => ['web', 'auth'],
],

use Illuminate\Support\Facades\Gate;

Gate::define('viewAnalyticsDashboard', fn ($user) => /* your policy */);
bash
php artisan vendor:publish --tag=analytics-config
bash
php artisan vendor:publish --tag=analytics-migrations
php artisan migrate
bash
php artisan vendor:publish --tag=analytics
php artisan migrate