inspirum/balikobot-laravel

Laravel package for inspirum/balikobot library

v1.0.0 2023-06-02 04:33 UTC

This package is auto-updated.

Last update: 2024-11-17 13:22:31 UTC


README

Latest Stable Version Build Status PHPStan Total Downloads Software License

Laravel integration for inspirum/balikobot.

Installation

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,
    ],
];

Config Files

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'

Usage

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(...)

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email tomas.novotny@inspirum.cz instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.