faisalilhami/laravel-consul-kv 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. Register service in providers array in config/app.php if you are using Laravel <= 10
  2. Register service in providers array in boostrap/providers.php if 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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-15