定制 sixlive/dotenv-editor 二次开发

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

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

sixlive/dotenv-editor

最新稳定版本:v2.1.0

Composer 安装命令:

composer require sixlive/dotenv-editor

包简介

A tool to edit phpdotenv files

README 文档

README

Latest Version on Packagist Total Downloads run-tests

This package provides some basic tools for editing dotenv files.

Installation

You can install the package via composer:

> composer require sixlive/dotenv-editor

Usage

Add a section

Given we have an existing file at base_path('.env').

APP_KEY=supersecret
APP_FOO=BAR

We can add a new section to the existing configuration file.

$editor = new DotenvEditor;

$editor->load(base_path('.env'));
$editor->heading('Examples');
$editor->set('FOO', 'bar');
$editor->set('BAZ', 'bax');
$editor->unset('APP_FOO');
$editor->save();

This will result in the following changes.

APP_KEY=supersecret

# Examples
FOO=bar
BAZ=bax

Testing

> vendor/bin/phpunit

Code Style

StyleCI will apply the Laravel preset.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email oss@tjmiller.co instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 1.39M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 76
  • 点击次数: 1
  • 依赖项目数: 15
  • 推荐数: 0

GitHub 信息

  • Stars: 74
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-17