Laravel integration for inspirum/balikobot
.
Run composer require command:
composer require inspirum/balikobot-laravel
Laravel will automatically register via Package Discovery.
If you opt out from package discovery it is necessary to register the service provider in config/app.php
.
<?php
return [
// ...
'providers' => [
// ...
Inspirum\Balikobot\Integration\Laravel\BalikobotServiceProvider::class,
],
];
In order to edit the default configuration you may execute:
php artisan vendor:publish --provider="Inspirum\Balikobot\Integration\Laravel\BalikobotServiceProvider"
After that, configure client credentials in config/balikobot.php
or by setting the env variables:
BALIKOBOT_API_USER='api_user'
BALIKOBOT_API_KEY='api_key'
Use ServiceContainerRegistry
to get ServiceContainer
for given connection.
/** @var Inspirum\Balikobot\Service\Registry\ServiceContainerRegistry $registry */
// get package service for default (or first) connection
$packageService = $registry->get()->getPackageService();
// get branch service for "client3" connection
$packageService = $registry->get('client3')->getBranchService();
or use services directly for default connection
/** @var Inspirum\Balikobot\Service\PackageService $packageService */
$packageService->addPackages(...)
/** @var Inspirum\Balikobot\Service\BranchService $branchService */
$branchService->getBranches(...)
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email tomas.novotny@inspirum.cz instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.