PHPackages                             ikovbas/laravel-env-switcher - 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. ikovbas/laravel-env-switcher

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

ikovbas/laravel-env-switcher
============================

Laravel 5 / Lumen 5 Environment Switcher

v1.1.1(10y ago)1771MITPHP

Since Jun 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ikovbas/laravel-env-switcher)[ Packagist](https://packagist.org/packages/ikovbas/laravel-env-switcher)[ RSS](/packages/ikovbas-laravel-env-switcher/feed)WikiDiscussions master Synced 1mo ago

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

Laravel Environment Switcher
============================

[](#laravel-environment-switcher)

Environment Switcher helps you to managing multiple .env of your Laravel 5 / Lumen 5 app.

The problem of **dotenv** is that you can't keep `.env` files for all your environments under version controll. This package trys to help you with it. For more details see [Usage](#usage-section) section.

Installation
------------

[](#installation)

**Environment Switcher** can be installed globally or per project, with **Composer**:

- **Globally**:

    ```
      composer global require ikovbas/laravel-env-switcher

    ```
- **Per project**:

    ```
      composer require ikovbas/laravel-env-switcher

    ```

Laravel Integration
-------------------

[](#laravel-integration)

Open your Laravel config file `config/app.php` and add the service provider for this package in the `$providers` array:

```
'IKovbas\EnvSwitcher\EnvSwitcherServiceProvider'

```

Lumen Integration
-----------------

[](#lumen-integration)

Open your `bootstrap/app.php` file and add the following line to **Register Service Providers** section:

```
$app->register('IKovbas\EnvSwitcher\EnvSwitcherServiceProvider');

```

Usage
--------------------------------------------

[](#usage)

- Show the current environment:

    ```
    $ php artisan env:switch
    Current application environment: production
    ```
- Save the current `.env` file to `.env.$APP_ENV`:

    ```
    $ php artisan env:switch --save
    Environmental config was successfully saved to .env.production
    ```
- Switch to another environment:

    ```
    $ php artisan env:switch development
    Successfully switched from production to development
    ```

    **Note:** `.env.development` file should exists before calling the command.

Copyright and license
---------------------

[](#copyright-and-license)

```
The MIT License

    Copyright (c) 2015 Ivan Kovbas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~7 days

Total

6

Last Release

3943d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/123277eea5c7faf413c7113dad60be6c13ed082f8cb188d1db7058e54ef9c748?d=identicon)[ikovbas](/maintainers/ikovbas)

---

Top Contributors

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

### Embed Badge

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

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

###  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)[livewire/flux

The official UI component library for Livewire.

9475.0M86](/packages/livewire-flux)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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