An Interface to Piwik's Analytics API for Laravel (Composer Package). For the Laravel 3 Bundle, go to https://github.com/RobBrazier/Laravel-Piwik
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ci
docs
src Fix Contents phpdocs Jul 17, 2018
tests/RobBrazier/Piwik
.codeclimate.yml fix some codeclimate stuff Mar 9, 2018
.dockerignore switch to go-task as runner and format for PSR2 Dec 9, 2017
.editorconfig switch to go-task as runner and format for PSR2 Dec 9, 2017
.gitignore switch to go-task as runner and format for PSR2 Dec 9, 2017
.sami.local.php 35 increase phpdoc detail (#37) May 19, 2017
.sami.php widen sami api docs generation tag criteria Mar 9, 2018
LICENSE improve test coverage and start Piwik class refactoring Apr 25, 2017
README.md Update version in README.md Jul 17, 2018
Taskfile.yml remove duplication from Taskfile.yml Dec 10, 2017
composer.json update email Jul 17, 2018
composer.lock
phpunit.xml

README.md

Laravel-Piwik v3.2.0

Build Status Code Climate Code Climate Minimum PHP Version Packagist Version Packagist Total Downloads Waffle.io

An Interface to Piwik's Analytics API for Laravel (Composer Package)

This is the Laravel 5 version of the Laravel-Piwik Bundle.

Installation

Add RobBrazier/Piwik to composer.json:

{
    "require": {
        "robbrazier/piwik": "~3.2"
    }
}

Add 'RobBrazier\Piwik\PiwikServiceProvider' and 'Piwik' => 'RobBrazier\Piwik\Facades\Piwik' to app/config/app.php

'providers' = array(
    ...
    RobBrazier\Piwik\PiwikServiceProvider::class,
    ...
);

[...]

'aliases' = array(
    ...
    'Piwik' => RobBrazier\Piwik\Facades\Piwik::class,
    ...
);

Then move the config file out of the package, so that it doesn't get replaced when you update, by running:

php artisan vendor:publish --provider="RobBrazier\Piwik\PiwikServiceProvider" --tag="config"

Update your packages with composer update or install with composer install.

Then go to config/piwik.php and add your config settings such as server, apikey, siteid etc.

Development

Scripts such as running unit tests for various PHP versions and integration tests for multiple Laravel versions are configured via the Taskfile.yml.

They can be run locally by installing go-task/task and then running the commands as below:

# unit tests
PHP_VERSION=7.1 task unitTest

# integration tests
LARAVEL_VERSION=5.5 task integrationTest

Documentation

Usage Documentation is located at http://laravel-piwik.robbrazier.com/Usage.html API Documentation is located at http://laravel-piwik.robbrazier.com/API_Docs.html

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT