定制 sgu-infocom-official/yii2-enveditor 二次开发

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

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

sgu-infocom-official/yii2-enveditor

Composer 安装命令:

composer require sgu-infocom-official/yii2-enveditor

包简介

Yii2 Env editor

README 文档

README

Latest Version Total Downloads

Module and component to edit env file

Installation

The preferred way to install yii2-enveditor is through Composer. Either add the following to the require section of your composer.json file:

"sguinfocom/yii2-enveditor": "*"

Or run:

$ php composer.phar require sguinfocom/yii2-enveditor "*"

You can manually install yii2-enveditor by downloading the source in ZIP-format.

Update the config file

// app/config/web.php
return [
'components' => [
        'env' => [
            'class' => '\sguinfocom\enveditor\components\EnvComponent',
            'autoBackup' => true,
            'backupPath' => "backups",
        ],
    ],
    'modules' => [
        'enveditor' => [
            'class' => '\sguinfocom\enveditor\Module',
            'allowedIds' => "1,2,3"
        ],
    ],
];

Options

Module Has the following options to modify it's behaviour:

  • allowedIds: The userids who have access to the module, multiple ids with comma separated.

Component Has the following options to modify it's behaviour:

  • filePath: The path to the .env file. Default to the basepath/.env
  • autoBackup: Autobackup to true or false. Default to true
  • backupPath: The folder where the backups need to be stored. Default to backups

Special thanks to JackieDo

Used his Laravel code to make it work in Yii2.

统计信息

  • 总下载量: 362
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-28