Access and manage Matomo from Laravel.
You can install the package via composer:
composer require bernskioldmedia/laravel-matomo
You can publish the config file with:
php artisan vendor:publish --tag="laravel-matomo-config"
This is the contents of the published config file:
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'),
];
A select number of the Matomo APIs are available, with more to be added as we have a need for them.
Each API has its own resource, with the methods available as nicely named methods. All are accessible via the provided Facade. See the examples below.
For the full list of methods, please refer, currently, to the source code,
use \BernskioldMedia\LaravelMatomo\Facades\Matomo;
// get a summary object of metrics for the site with the ID 1.
$summary = Matomo::summary()->site(1)->all();
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.