faisalilhami/laravel-consul-kv
最新稳定版本:1.0.2
Composer 安装命令:
composer require faisalilhami/laravel-consul-kv
包简介
Package for laravel to connect to consul kv
README 文档
README
Package for help you load config from Consul server
Install
composer require faisalilhami/laravel-consul-kv
Laravel
- Register service in
providersarray inconfig/app.phpif you are using Laravel <= 10 - Register service in
providersarray inboostrap/providers.phpif you are using Laravel >= 11
Faisalilhami\LaravelConsulKv\Provider::class
Publish consul configuration file
php artisan vendor:publish --provider="Faisalilhami\LaravelConsulKv\Provider"
Publish consul configuration file
cp vendor/faisalilhami/laravel-consul-kv/src/consul.php config/consul.php
Config
Create .env file with these configurations:
CONSUL_ENABLE=true CONSUL_URI= CONSUL_TOKEN= CONSUL_SCHEME= CONSUL_DC= CONSUL_PATH= CONSUL_RECURSIVE=true
Add any Key Folder Consul you want to be loaded
'keys' => [ // 'foo', // 'bar' ],
Get env from Consul
php artisan get:consul
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-15