Download the PHP package highsolutions/laravel-environments without Composer
On this page you can find all versions of the php package highsolutions/laravel-environments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download highsolutions/laravel-environments
More information about highsolutions/laravel-environments
Files in highsolutions/laravel-environments
Package laravel-environments
Short Description A Laravel package for easy management of different environments (dev, staging, production, etc.).
License MIT
Informations about the package laravel-environments
Laravel Environments
Easy management of different environments in Laravel projects.
Installation
This package can be installed through Composer:
Or by adding the following line to the require
section of your Laravel webapp's composer.json
file:
And run composer update
to install the package.
Then, if you are using Laravel <= 5.4, update config/app.php
by adding an entry for the service provider:
Optionally, publish the configuration file if you want to change any defaults:
This will create new file config/environments.php
with few configuration options for package.
Configuration
Name | Description | Default |
---|---|---|
path | Path where environments will be stored | environments/ |
files | Files that will be stored for each environment | [ '.env', 'phpunit.xml', 'public/.htaccess', ] |
clear_directory_when_overwriting | If set to true, overwriting environment will be cleared out before putting new files there | false |
keep_existing_file_when_missing | If set to true, existing file in base directory will be not deleted when this file is missing in environment set to active | false |
Usage
Create a new environment
To create a new environment, just use create
method:
In case that another environment exists with the same name, you can force to overwrite it with --overwrite
option:
You can use also predefined make:env
method to be more consistent with other Laravel commands (--overwrite
option is enabled here):
Set environment as active
To copy files to main codebase, just use set
method:
Copy an environment
To make a duplicate of existing environment, just use copy
method:
In case that another environment exists with the same name, you can force to overwrite it with --overwrite
option:
Remove an environment
To remove an environment, just use remove
method:
List all environments
To see a list of all environments, just use list
method:
Testing
Run the tests with:
Changelog
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
toconfig/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
This package is developed by HighSolutions, software house from Poland in love in Laravel.
All versions of laravel-environments with dependencies
illuminate/console Version 5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/support Version 5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0