inspirum/balikobot-laravel
inspirum/balikobot库的Laravel包
v1.0.0
2023-06-02 04:33 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- illuminate/support: ^10.0
- inspirum/balikobot: ^7.6
Requires (Dev)
- inspirum/coding-standard: ^1.3
- laravel/laravel: ^10.0
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.1
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-09-17 12:56:29 UTC
README
Laravel 对 inspirum/balikobot
的集成。
安装
运行composer require命令
composer require inspirum/balikobot-laravel
Laravel将自动通过包发现进行注册。
如果你取消了包发现,那么在config/app.php
中注册服务提供者是必要的。
<?php return [ // ... 'providers' => [ // ... Inspirum\Balikobot\Integration\Laravel\BalikobotServiceProvider::class, ], ];
配置文件
为了编辑默认配置,你可以执行
php artisan vendor:publish --provider="Inspirum\Balikobot\Integration\Laravel\BalikobotServiceProvider"
之后,在config/balikobot.php
中配置客户端凭证,或者通过设置环境变量
BALIKOBOT_API_USER='api_user' BALIKOBOT_API_KEY='api_key'
用法
使用ServiceContainerRegistry
获取给定连接的ServiceContainer
。
/** @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();
或者直接使用默认连接的服务
/** @var Inspirum\Balikobot\Service\PackageService $packageService */ $packageService->addPackages(...) /** @var Inspirum\Balikobot\Service\BranchService $branchService */ $branchService->getBranches(...)
贡献
请参阅CONTRIBUTING和CODE_OF_CONDUCT以获取详细信息。
安全
如果你发现任何安全相关的问题,请通过tomas.novotny@inspirum.cz发送电子邮件,而不是使用问题跟踪器。
致谢
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。