Download the PHP package injic/laravel-statcounter without Composer
On this page you can find all versions of the php package injic/laravel-statcounter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download injic/laravel-statcounter
More information about injic/laravel-statcounter
Files in injic/laravel-statcounter
Package laravel-statcounter
Short Description Laravel integration of the StatCounter API
License MIT
Homepage https://github.com/injic/laravel-statcounter
Informations about the package laravel-statcounter
StatCounter API with support for Laravel 5
The package supports use with the Laravel framework (v5) providing a Stat
facade for the StatCounter API. You can find the documentation for this package here.
Setup:
In order to install, add the following to your composer.json
file within the require
block:
Now, run the command composer update
.
Within Laravel, locate the file /config/app.php
. Add the following to the providers
array:
Furthermore, add the following the aliases
array:
Publish the configuration
Find the package's config found in /config/statcounter.php
. You'll need to fill out your StatCounter username, API password, and project information. Since the config file contains further information on the individual values, here are a few things to note:
username
is the case-sensitive login username for StatCounterpassword
referes to the API password, not the login password (see API Password)default
must match one of the project names underprojects
your-project-name
is the only value that isn't specified by StatCounter. It's an alias of your choosing used when calling functions which handle projects.projects
andsecurity-codes
must having matching keys (i.e. the project names).
Usage:
Methods of the Stat
class simplify what is needed for a StatCounter API query as described in the StatCounter API Documentation. Additionally, the Stat
class was modeled off of the Laravel DB Query design, and you may expect similar methods.
You can find the documentation for this package here.