PHP code example of bernskioldmedia / laravel-matomo

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

    

bernskioldmedia / laravel-matomo example snippets


return [

    /**
     * This is the Matomo API key that allows you to work
     * with the API.
     */
    'api_key' => env('MATOMO_API_KEY'),

    /**
     * This is the URL of the Matomo installation that you want
     * to use the package with.
     */
    'base_url' => env('MATOMO_BASE_URL'),

];

use \BernskioldMedia\LaravelMatomo\Facades\Matomo;

// get a summary object of metrics for the site with the ID 1.
$summary = Matomo::summary()->site(1)->all();

bash
php artisan vendor:publish --tag="laravel-matomo-config"