PHP code example of ssebetta / larnalytics

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

    

ssebetta / larnalytics example snippets


    protected $middlewareGroups = [
        'web' => [
            // ...
            \Ssebetta\Larnalytics\Http\Middleware\TrackPageViews::class,
        ],
    ];
    

use Ssebetta\Larnalytics\Helpers\Analytics;

Analytics::logEvent('event_name', ['key' => 'value']);
bash
    php artisan vendor:publish --provider="Ssebetta\Larnalytics\Providers\LarnalyticsServiceProvider"
    
bash
    php artisan migrate