| Package Data | |
|---|---|
| Maintainer Username: | nikolajlovenhardt |
| Maintainer Contact: | nikolaj.lovenhardt@gmail.com (Nikolaj Petersen) |
| Package Create Date: | 2016-03-09 |
| Package Last Update: | 2016-03-09 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-07 15:04:47 |
| Package Statistics | |
|---|---|
| Total Downloads: | 1,961 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 2 |
| Total Watchers: | 2 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Install using composer
composer require nikolajlovenhardt/laravel-keen-io
Add the LaravelKeenIO\LaravelKeenIOProvider in config/app.php
[
LaravelKeenIO\LaravelKeenIOProvider::class,
],
Then run php artisan vendor:publish to publishe the keen.io configuration file into config/keen-io.php and add
your projects.
[
'KeenIO' => LaravelKeenIO\Facades\KeenIOFacade::class,
],
This package is built as a configuration wrapper for keen-io/keen-io.
Example:
<?php
namespace App\Controllers;
use LaravelKeenIO\Services\KeenIOService;
use LaravelKeenIO\Services\KeenIOServiceInterface;
class DemoController
{
/** @var KeenIOServiceInterface */
protected $keenIOService;
public function __construct(KeenIOService $keenIOService)
{
$this->keenIOService = $keenIOService;
}
public function action()
{
/** @var KeenIOClient $keenIO */
$keenIO = $this->keenIOService->client();
echo 'KeenIOClient with the default project';
}
public function anotherAction()
{
$project = 'projectName';
/** @var KeenIOClient $keenIO */
$keenIO = $this->keenIOService->client($project);
echo sprintf(
'KeenIOClient with the \'%s\' project',
$project
);
}
}
<?php
namespace App\Controllers;
use KeenIO;
use LaravelKeenIO\Services\KeenIOService;
use LaravelKeenIO\Services\KeenIOServiceInterface;
class DemoController
{
public function action()
{
/** @var KeenIOClient $keenIO */
$keenIO = KeenIO::client();
echo 'KeenIOClient with the default project';
}
public function anotherAction()
{
$project = 'projectName';
/** @var KeenIOClient $keenIO */
$keenIO = KeenIO::client($project);
echo sprintf(
'KeenIOClient with the \'%s\' project',
$project
);
}
}
For more information on the usage of KeenIO, please refer to the documentation of the PHP client and the
main keen.io documentation.