Skip to content

An artisan command for using multiple environment configurations in Laravel 5

Notifications You must be signed in to change notification settings

tommyku/laravel5_env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Laravel 5 env

An artisan command for managing multiple .env of your Laravel 5 app.

Installation

  1. Copy EnvCommand.php to app/Console/Commands/ of your Laravel 5 app.
  2. Register the command in app/Console/Kernel.php (or copy the one from this repo)

Usage

Save the current .env into .$APP_ENV.env.

$ php artisan env
Current application environment: local
$ php artisan env:switch --save
Environmental config file .local.env saved

Switch to another environment, given .$TARGET_ENV.env exists.

$ php artisan env
Current application environment: test
$ php artisan env:switch local
Successfully switched from test to local.
$ php artisan env
Current application environment: local

Thank you

  • Thanks @leonel for raising the issue, which inspired me to create this command.

About

An artisan command for using multiple environment configurations in Laravel 5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages