PHPackages                             klc/env-switch - 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. klc/env-switch

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

klc/env-switch
==============

multiple env usage for laravel project

v1.0.1(4y ago)09MITPHP

Since Sep 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/klc/env-switch)[ Packagist](https://packagist.org/packages/klc/env-switch)[ RSS](/packages/klc-env-switch/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

env-switch
==========

[](#env-switch)

How To Install
--------------

[](#how-to-install)

`composer require klc/env-switch`

How To Use
----------

[](#how-to-use)

example :

.env

```
DEFAULT_ENV=foo.env
HELLO=ENV

```

foo.env

```
HELLO=FOO

```

bar.env

```
HELLO=BAR

```

code

```
        dump(env("HELLO"));
        envSwitch('bar.env');
        dump(env("HELLO"));
        envSwitch('.env');
        dd(env("HELLO"));
```

output

```
FOO
BAR
ENV

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~0 days

Total

2

Last Release

1712d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e71d284fd2e01efdb0eda7625243d46824c259137aeaba73b68b4e562cda5023?d=identicon)[klc](/maintainers/klc)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/klc-env-switch/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[illuminate/pipeline

The Illuminate Pipeline package.

9346.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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