bernskioldmedia / laravel-matomo
Access and manage Matomo from Laravel.
Requires
- php: ^8.0
- illuminate/contracts: ^9.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-11-08 04:27:41 UTC
README
Access and manage Matomo from Laravel.
Installation
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'), ];
Usage
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();
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.