PHPackages                             highsolutions/laravel-environments - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. highsolutions/laravel-environments

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

highsolutions/laravel-environments
==================================

A Laravel package for easy management of different environments (dev, staging, production, etc.).

3.7.0(3mo ago)411.9k↓35.2%MITPHPPHP ^5.4|^7.3|^8.0.2CI failing

Since Apr 17Pushed 3mo agoCompare

[ Source](https://github.com/highsolutions/laravel-environments)[ Packagist](https://packagist.org/packages/highsolutions/laravel-environments)[ RSS](/packages/highsolutions-laravel-environments/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (10)Versions (16)Used By (0)

Laravel Environments
====================

[](#laravel-environments)

[![License: MIT](https://camo.githubusercontent.com/c2bffd81d308ced1cc3b0d66fb0ed453ab478a5e17c988b780f9de986a390ee2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://opensource.org/licenses/MIT)

Easy management of different environments in Laravel projects.

[![Laravel-Environments by HighSolutions](https://raw.githubusercontent.com/highsolutions/laravel-environments/master/intro.jpg)](https://raw.githubusercontent.com/highsolutions/laravel-environments/master/intro.jpg)

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

[](#installation)

This package can be installed through Composer:

```
composer require highsolutions/laravel-environments
```

Or by adding the following line to the `require` section of your Laravel webapp's `composer.json` file:

```
    "require": {
        "HighSolutions/laravel-environments": "3.*"
    }
```

And run `composer update` to install the package.

Then, if you are using Laravel &lt;= 5.4, update `config/app.php` by adding an entry for the service provider:

```
'providers' => [
    // ...
    HighSolutions\LaravelEnvironments\EnvironmentServiceProvider::class,
];
```

Optionally, publish the configuration file if you want to change any defaults:

```
php artisan vendor:publish --provider="HighSolutions\LaravelEnvironments\EnvironmentServiceProvider"
```

This will create new file `config/environments.php` with few configuration options for package.

Configuration
-------------

[](#configuration)

NameDescriptionDefaultpathPath where environments will be storedenvironments/filesFiles that will be stored for each environment\[ '.env', 'phpunit.xml', 'public/.htaccess', \]clear\_directory\_when\_overwritingIf set to true, overwriting environment will be cleared out before putting new files therefalsekeep\_existing\_file\_when\_missingIf set to true, existing file in base directory will be not deleted when this file is missing in environment set to activefalseUsage
-----

[](#usage)

Create a new environment
========================

[](#create-a-new-environment)

To create a new environment, just use `create` method:

```
    php artisan env:create NAME_OF_ENVIRONMENT
```

In case that another environment exists with the same name, you can force to overwrite it with `--overwrite` option:

```
    php artisan env:create local --overwrite
```

You can use also predefined `make:env` method to be more consistent with other Laravel commands (`--overwrite` option is enabled here):

```
    php artisan make:env NAME_OF_ENVIRONMENT
```

Set environment as active
=========================

[](#set-environment-as-active)

To copy files to main codebase, just use `set` method:

```
    php artisan env:set NAME_OF_ENVIRONMENT
```

Copy an environment
===================

[](#copy-an-environment)

To make a duplicate of existing environment, just use `copy` method:

```
    php artisan env:copy NAME_OF_EXISTING_ENVIRONMENT NAME_OF_NEW_ENVIRONMENT
```

In case that another environment exists with the same name, you can force to overwrite it with `--overwrite` option:

```
    php artisan env:copy old new --overwrite
```

Remove an environment
=====================

[](#remove-an-environment)

To remove an environment, just use `remove` method:

```
    php artisan env:remove NAME_OF_ENVIRONMENT
```

List all environments
=====================

[](#list-all-environments)

To see a list of all environments, just use `list` method:

```
    php artisan env:list
```

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

Changelog
---------

[](#changelog)

3.7.0

- Laravel 13.0 support

3.6.0

- Laravel 12.0 support

3.5.0

- Laravel 11.0 support

3.4.0

- Laravel 10.0 support

3.3.0

- Laravel 9.0 support

3.2.0

- Laravel 8.0 support

3.1.0

- Laravel 7.0 support

3.0.0

- Laravel 5.8 and 6.0 support

2.2.0

- Change name of config file from `config/laravel-environments.php` to `config/environments.php`

2.1.0

- Removing files that are exist in base folder but not exist in environment being set to active

2.0.0

- Support for all Laravel 5.\* versions (to-date)

1.6.0

- Laravel 5.6 support

1.5.0

- Create, Copy, Remove, Set, List commands
- Unit tests
- Laravel 5.5 Support

Credits
-------

[](#credits)

This package is developed by [HighSolutions](https://highsolutions.org), software house from Poland in love in Laravel.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance80

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity76

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

Recently: every ~371 days

Total

15

Last Release

108d ago

Major Versions

1.6.1 → 2.0.02018-04-23

2.2.0 → 3.0.02019-09-04

PHP version history (5 changes)1.5.0PHP &gt;=5.6.4

1.6.0PHP &gt;=7.1.3

2.0.0PHP &gt;=5.4.0

3.3.0PHP &gt;=5.4.0|&gt;=8.0.2

3.6.0PHP ^5.4|^7.3|^8.0.2

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelserverenvmanagementenvironments

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/highsolutions-laravel-environments/health.svg)

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

###  Alternatives

[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725173.2k14](/packages/tallstackui-tallstackui)[laravel/surveyor

Static analysis tool for Laravel applications.

86121.4k13](/packages/laravel-surveyor)

PHPackages © 2026

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