areia-lab/env-craft
最新稳定版本:v1.0.1
Composer 安装命令:
composer require areia-lab/env-craft
包简介
Simple UI + Artisan manager for .env with backup/restore
关键字:
README 文档
README
A Laravel package to manage .env values via a modern Tailwind-based UI or Artisan commands, with full backup and restore functionality.
Installation
composer require areia-lab/env-craft
Publish Vendor Assets
Config
php artisan vendor:publish --tag="craft-env-config"
Views
php artisan vendor:publish --tag="craft-env-views"
Customize Configuration (config/env.php)
return [ 'panel' => [ 'url_prefix' => 'admin/env-manager', 'call_back_title' => 'Home', 'call_back_url' => '/', 'title_prefix' => 'Env', 'title_suffix' => 'Craft', ], 'middleware' => ['web'], 'editable_keys' => [], 'backup' => [ 'auto_save_when_update' => false, 'disk' => 'local', 'dir_path' => 'backup/env-backups', 'max_limit' => 50, ], ];
Usage
Web UI
Visit /admin/env-manager in your Laravel application to access the EnvCraft UI.
Dashboard (Dark Mode)
Dashboard (Light Mode)
Artisan Commands
Backup
- Create a backup:
php artisan env:backup
- Create a backup with directory details:
php artisan env:backup -d|--details
List Backups
php artisan env:backup-list
Show .env Values
- Show all key-value pairs:
php artisan env:show
- Show a specific key:
php artisan env:show --key=APP_KEY
# or
php artisan env:show -k APP_KEY
Set .env Values
- Interactive prompt:
php artisan env:set
- Set key and value directly:
php artisan env:set --key="TEST_KEY" --value="Abc123"
Restore Backups
- Restore from a backup (interactive list):
php artisan env:restore --show
- Restore from a predefined backup file path:
php artisan env:restore C:\laragon\www\packages\laravel-env-editor\storage\app\backup\env-backups\.env_backup_20250913_104031
Delete Backups
- Delete a specific backup:
php artisan env:backup-delete --file="/storage/app/backup/env-backups/.env_backup_20250913_141200"
- Delete all backups:
php artisan env:backup-delete --all
- Delete previous N backups (excluding latest):
php artisan env:backup-delete --pre=10
- Interactive delete (choose from latest 10 backups):
php artisan env:backup-delete
This package is fully compatible with **Laravel 9–12** and ensures safe `.env` management with backup/restore mechanisms.
📜 License
MIT © AreiaLab
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-13

