2017 © Pedro Peláez
 

library laravel-environments

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

image

highsolutions/laravel-environments

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

  • Wednesday, April 25, 2018
  • by HighSolutions
  • Repository
  • 1 Watchers
  • 3 Stars
  • 54 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 32 % Grown

The README.md

Laravel Environments

License: MIT, (*1)

Easy management of different environments in Laravel projects., (*2)

Laravel-Environments by HighSolutions, (*3)

Installation

This package can be installed through Composer:, (*4)

composer require highsolutions/laravel-environments

Or by adding the following line to the require section of your Laravel webapp's composer.json file:, (*5)

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

And run composer update to install the package., (*6)

Then, if you are using Laravel <= 5.4, update config/app.php by adding an entry for the service provider:, (*7)

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

Optionally, publish the configuration file if you want to change any defaults:, (*8)

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

This will create new file config/environments.php with few configuration options for package., (*9)

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:, (*10)

    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:, (*11)

    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):, (*12)

    php artisan make:env NAME_OF_ENVIRONMENT

Set environment as active

To copy files to main codebase, just use set method:, (*13)

    php artisan env:set NAME_OF_ENVIRONMENT

Copy an environment

To make a duplicate of existing environment, just use copy method:, (*14)

    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:, (*15)

    php artisan env:copy old new --overwrite

Remove an environment

To remove an environment, just use remove method:, (*16)

    php artisan env:remove NAME_OF_ENVIRONMENT

List all environments

To see a list of all environments, just use list method:, (*17)

    php artisan env:list

Testing

Run the tests with:, (*18)

bash vendor/bin/phpunit, (*19)

Changelog

3.6.0 * Laravel 12.0 support, (*20)

3.5.0 * Laravel 11.0 support, (*21)

3.4.0 * Laravel 10.0 support, (*22)

3.3.0 * Laravel 9.0 support, (*23)

3.2.0 * Laravel 8.0 support, (*24)

3.1.0 * Laravel 7.0 support, (*25)

3.0.0 * Laravel 5.8 and 6.0 support, (*26)

2.2.0 * Change name of config file from config/laravel-environments.php to config/environments.php, (*27)

2.1.0 * Removing files that are exist in base folder but not exist in environment being set to active, (*28)

2.0.0 * Support for all Laravel 5.* versions (to-date), (*29)

1.6.0 * Laravel 5.6 support, (*30)

1.5.0 * Create, Copy, Remove, Set, List commands * Unit tests * Laravel 5.5 Support, (*31)

Credits

This package is developed by HighSolutions, software house from Poland in love in Laravel., (*32)

The Versions

25/04 2018

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar HighSolutions

laravel server management env environments

25/04 2018

2.2.0

2.2.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar HighSolutions

laravel server management env environments

25/04 2018

2.1.0

2.1.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar HighSolutions

laravel server management env environments

23/04 2018

2.0.0

2.0.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar HighSolutions

laravel server management env environments

17/04 2018

1.6.1

1.6.1.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar HighSolutions

laravel server management env environments

17/04 2018

1.6.0

1.6.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar HighSolutions

laravel server management env environments

17/04 2018

1.5.0

1.5.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar HighSolutions

laravel server management env environments