2017 © Pedro Peláez
 

library laravel-stathat

Laravel 4.2 integration for the Stathat API

image

diegorivas89/laravel-stathat

Laravel 4.2 integration for the Stathat API

  • Sunday, May 3, 2015
  • by diegorivas89
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Stathat wrapper for Laravel 4

Build Status License, (*1)

Laravel 4 integration for the Stathat API, (*2)

Requeriments

  • php >= 5.4
  • illuminate/support: 4.2.*

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require diegorivas89/stathat-laravel., (*3)

"require": {
    "diegorivas89/stathat-laravel": "dev-master"
}

Next, update Composer from the Terminal:, (*4)

composer update

Once this operation completes, add the service provider. Open app/config/app.php, and add a new item to the providers array., (*5)

'Stathat\StathatServiceProvider'

Also you can add the facade accesor to the end of aliases key in app/config/app.php, (*6)

'Stathat' => 'Stathat\Facades\StathatEz'

or if you want to use the classic api, (*7)

'Stathat' => 'Stathat\Facades\StathatClassic'

The final step is publish the config file. For this, run, (*8)

php artisan config:publish

Configuration

In the published file you must set your credentials, this is the user_key and the email depending on the type of api you will use., (*9)

Usage

Stathat::count('page_views'); // default value is 1
Stathat::count('page_views', 2);
Stathat::value('revenue', 17);

or if you have to have to use more than one account of stathat, you could do:, (*10)

Stathat::count('page_views', 1); // default account from config
Stathat::count('page_views', 1, 'first.account@email.com');
Stathat::count('page_views', 1, 'second.account@email.com');

The Versions

03/05 2015

dev-master

9999999-dev https://github.com/diegorivas89/laravel-stathat-wrapper

Laravel 4.2 integration for the Stathat API

  Sources   Download

MIT

The Requires

 

by Diego Rivas

laravel stats api bindings stathat