PHPackages                             xin6841414/laravel-env - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. xin6841414/laravel-env

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xin6841414/laravel-env
======================

一个laravel编辑env文件的小工具

1.1.1(5y ago)03MITPHPPHP &gt;7.0

Since Nov 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/xin6841414/laravel-env)[ Packagist](https://packagist.org/packages/xin6841414/laravel-env)[ RSS](/packages/xin6841414-laravel-env/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

LaravelEnv
==========

[](#laravelenv)

一个方便后台编辑env文件的小工具

1、安装
----

[](#1安装)

```
    composer require xin6841414/laravel-env -vvv
```

2、使用
----

[](#2使用)

### 2.1、查询列表

[](#21查询列表)

```
$laravelEnv = app('laravel-env');
$list = $laravelEnv->getFormatData();

// [
//    ['APP_NAME'=>'shagncheng.shoumai365.com'],
//    ['APP_ENV'=>'local']
//        ...
// ]
```

### 2.2、获取单个env配置

[](#22获取单个env配置)

```
$num = 10;  //上一步获取到的索引数组的索引键值，
$key = 'APP_NAME'; //配置项键值，$num和$key 不能同时为null，
$value = $laravelEnv->getEnv($num, $key);
```

### 2.3、设置env配置

[](#23设置env配置)

```
$data = [
    'APP_NAME' => '项目名修改',
    'APP_NAME1' => '项目名追加'
];
$laravelEnv->setEnv($data);
```

贡献
--

[](#贡献)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/xin6841414/laravel-env/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/xin6841414/laravel-env/issues).
3. Contribute new features or update the wiki.

*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.*

License
-------

[](#license)

MIT

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2001d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20766942?v=4)[xin6841414](/maintainers/xin6841414)[@xin6841414](https://github.com/xin6841414)

---

Top Contributors

[![xin6841414](https://avatars.githubusercontent.com/u/20766942?v=4)](https://github.com/xin6841414 "xin6841414 (1 commits)")

### Embed Badge

![Health badge](/badges/xin6841414-laravel-env/health.svg)

```
[![Health](https://phpackages.com/badges/xin6841414-laravel-env/health.svg)](https://phpackages.com/packages/xin6841414-laravel-env)
```

###  Alternatives

[ideea/language-detector

Detect languages by text

334.4k](/packages/ideea-language-detector)[jandc/css-from-html-extractor

Php library which determines which css is used from html snippets.

1028.7k1](/packages/jandc-css-from-html-extractor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
