定制 dragon-code/env-sync-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

dragon-code/env-sync-laravel

最新稳定版本:2.5.0

Composer 安装命令:

composer require dragon-code/env-sync-laravel

包简介

env-sync package adapter for Laravel framework

README 文档

README

Environment Synchronization

Stable Version Unstable Version Total Downloads Github Workflow Status License

Tip

Use msamgan/laravel-env-keys-checker instead.

Installation

To get the latest version of Environment Synchronization, simply require the project using Composer:

$ composer require dragon-code/env-sync-laravel --dev

Or manually update require-dev block of composer.json and run composer update.

{
    "require-dev": {
        "dragon-code/env-sync-laravel": "^2.0"
    }
}

Upgrade from andrey-helldar/env-sync-laravel

  1. In your composer.json file, replace "andrey-helldar/env-sync-laravel": "^1.0" with "dragon-code/env-sync-laravel": "^2.0".
  2. Run the composer update command.

How to use

This package scans files with *.php, *.json, *.yml, *.yaml and *.twig extensions in the specified folder, receiving from them calls to the env and getenv functions. Based on the received values, the package creates a key-value array. When saving, the keys are split into blocks by the first word before the _ character.

Also, all keys are sorted alphabetically.

Laravel / Lumen Frameworks

Just execute the php artisan env:sync command.

You can also specify the invocation when executing the composer update command in composer.json file:

{
    "scripts": {
        "post-update-cmd": [
            "php artisan env:sync"
        ]
    }
}

Now, every time you run the composer update command, the environment settings file will be synchronized.

If you want to force the stored values, you can change the configuration file by publishing it with the command:

php artisan vendor:publish --provider="DragonCode\EnvSync\Frameworks\Laravel\ServiceProvider"

Now you can change the file config/env-sync.php.

Native using

See the documentation in the base repository.

License

This package is licensed under the MIT License.

统计信息

  • 总下载量: 14.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 18
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 2

GitHub 信息

  • Stars: 18
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-23