Package Data | |
---|---|
Maintainer Username: | YaangVu |
Maintainer Contact: | yaangvu@gmail.com (Yaang Vu) |
Package Create Date: | 2021-05-20 |
Package Last Update: | 2023-03-26 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 15:12:35 |
Package Statistics | |
---|---|
Total Downloads: | 10,761 |
Monthly Downloads: | 511 |
Daily Downloads: | 16 |
Total Stars: | 3 |
Total Watchers: | 2 |
Total Forks: | 2 |
Total Open Issues: | 0 |
Laravel Consul
help you load config from Consul
server
composer require yaangvu/laravel-consul
Register service in providers
array in config/app.php
YaangVu\Consul\ConsulProvider::class
Publish consul configuration file
php artisan vendor:publish --provider="YaangVu\Consul\ConsulProvider"
Register service in app/Providers/AppServiceProvider.php
public function register()
{
$this->app->register(\YaangVu\Consul\ConsulProvider::class);
}
Publish consul configuration file
cp vendor/yaangvu/laravel-consul/src/consul.php config/consul.php
Append .env
file with these configurations:
CONSUL_ENABLE=true
CONSUL_URI=${CONSUL_URI}
CONSUL_TOKEN=${CONSUL_TOKEN}
CONSUL_SCHEME=${CONSUL_SCHEME}
CONSUL_DC=${CONSUL_DC}
CONSUL_PATH=${CONSUL_PATH}
Add any Key Folder Consul you want to be loaded
'keys' => [
// 'foo',
// 'bar'
],