xin6841414/laravel-env is a Laravel package for 一个laravel编辑env文件的小工具.
It currently has 0 GitHub stars and 3 downloads on Packagist (latest version 1.1.1).
Install it with composer require xin6841414/laravel-env.
Discover more Laravel packages by xin6841414
or browse all Laravel packages to compare alternatives.
Last updated
一个方便后台编辑env文件的小工具
composer require xin6841414/laravel-env -vvv
$laravelEnv = app('laravel-env');
$list = $laravelEnv->getFormatData();
// [
// ['APP_NAME'=>'shagncheng.shoumai365.com'],
// ['APP_ENV'=>'local']
// ...
// ]
$num = 10; //上一步获取到的索引数组的索引键值,
$key = 'APP_NAME'; //配置项键值,$num和$key 不能同时为null,
$value = $laravelEnv->getEnv($num, $key);
$data = [
'APP_NAME' => '项目名修改',
'APP_NAME1' => '项目名追加'
];
$laravelEnv->setEnv($data);
You can contribute in one of three ways:
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
MIT