osotov/illuminate-for-bitrix
最新稳定版本:0.1.0
Composer 安装命令:
composer require osotov/illuminate-for-bitrix
包简介
Adaptation of some Illuminate components for usage inside 1C-Bitrix framework
关键字:
README 文档
README
Adaptation of some Illuminate components for usage inside 1C-Bitrix framework
note
This package requires latest versions of php (>= 5.5.9).
installation
To install package, run the command below and you will get the latest version
composer require osotov/illuminate-for-bitrix
usage
Include Composer autoloader (/vendor/autoload.php) inside init.php file.
Instantiate bootstrapper class and use bootstrap method to initialize container.
$bootstrapper = new \Osotov\IlluminateForBitrix\Bootstrapper(); $bootstrapper->bootstrap();
Now you are able to get container instance from any code executed after init.php.
$container = \Osotov\IlluminateForBitrix\Container::getContainer();
If you want to register service provider class pass its instance to registerServiceProviders method.
$serviceProvider = new MyServiceProvider(); $bootstrapper->registerServiceProviders($serviceProvider);
If you want to use Eloquent use addDbConnection method. By default it uses Bitrix connection credentials. If you want to use different connection pass array with credentials as argument.
$bootstrapper->addDbConnection();
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-14