承接 fadllabanie/env-editor 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

fadllabanie/env-editor

Composer 安装命令:

composer require fadllabanie/env-editor

包简介

A Laravel package to edit .env files from a web interface.

README 文档

README

Version Features
V.1 Edit env file

EnvEditor is a Laravel package that allows you to easily view and edit your .env file through a web interface.

Features

  • View and edit .env variables in a form-based interface.
  • Add new key-value pairs.
  • Remove existing keys.
  • IP restriction for security.
  • Username/password authentication.

Installation

Follow these steps to install the package into your Laravel project:

  1. Install the package via Composer:
composer require fadllabanie/env-editor
  1. Publish the package configuration and views:
php artisan vendor:publish --tag=config --provider="Fadllabanie\EnvEditor\EnvEditorServiceProvider"

This will create the config/env-editor php file and publish the views required for the UI.

  1. Add the following environment variables to your .env file:
ENV_EDITOR_ENABLE=true
ENV_EDITOR_USERNAME=admin
ENV_EDITOR_PASSWORD=password
ENV_EDITOR_WHITE_IPS_LIST=127.0.0.1
  1. Optionally, update the configuration in config/env-editor php to customize the username, password, and IPs restrictions.

Usage

  1. Access the EnvEditor Interface: Visit the route /env-editor/login to log in and access the interface.

  2. Authentication: Use the username and password specified in the .env file (or the default ones set in config/env-editor.php).

  3. Edit .env File: Once authenticated, you can view the current .env file, modify existing variables, or add new key-value pairs.

  4. Logout: You can log out from the interface at any time using the logout button.

Security

  1. IP Restriction: You can restrict access by IP using the ENV_EDITOR_WHITE_IPS_LIST environment variable. Add a comma-separated list of allowed IP addresses.

  2. Session Time: The session expires after 2 minutes by default.

Configuration

After publishing the configuration file, you can modify the following settings in config/env-editor.php:

return [
    'env-editor-enable' => env('ENV_EDITOR_ENABLE', true),
    'white_ips_list' => env('ENV_EDITOR_WHITE_IPS_LIST', ['127.0.0.1']),
    'username' => env('ENV_EDITOR_USERNAME', 'admin'),
    'password' => env('ENV_EDITOR_PASSWORD', 'password')
];

Clearing Config Cache

you make changes to the .env file or config/env-editor.php, make sure to clear the config cache to reflect the updates:

php artisan config:clear

License

This package is open-source and licensed under the MIT License.

How to Use This:

  1. Copy the text to a README.md file in the root of your package directory.
  2. Customize any parts (like the IPs, username, or password) according to your specific setup.
  3. Include instructions for how to install, configure, and use the package.

Let me know if you need any changes or further clarifications!

fadllabanie/env-editor 适用场景与选型建议

fadllabanie/env-editor 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 3, 最近一次更新时间为 2024 年 10 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 fadllabanie/env-editor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 fadllabanie/env-editor 我们能提供哪些服务?
定制开发 / 二次开发

基于 fadllabanie/env-editor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-11