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
tests/RobBrazier/Piwik
.codeclimate.yml
.dockerignore
.editorconfig
.gitignore
.sami.local.php
.sami.php
LICENSE
README.md
Taskfile.yml
composer.json
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