2017 © Pedro Peláez
 

library laravel-env-packages

This package lets you define various package requirements according to the environment.

image

mesingh/laravel-env-packages

This package lets you define various package requirements according to the environment.

  • Sunday, March 18, 2018
  • by meSingh
  • Repository
  • 2 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Laravel Environment Specific Packages

Latest Version on Packagist ![Software License][ico-license], (*1)

This package lets you define various package requirements according to the environment., (*2)

Install

Via Composer, (*3)

``` bash $ composer require mesingh/laravel-env-packages, (*4)


Then add the service provider in `config/app.php`: ``` php meSingh\EnvPackages\EnvPackagesServiceProvider::class,

Then publish vendor files for access the configuration file:, (*5)

``` bash $ php artisan vendor:publish --provider="meSingh\EnvPackages\EnvPackagesServiceProvider", (*6)


## Usage You need to run ```envpackages:generate``` command after each configuration update. ``` bash $ php artisan envpackages:generate

Configuration

envpackages.php file is used to define any package requirements that are loaded over some specific environment like you might have some development packages installed that you do not wish to load over production and/or staging., (*7)

You can define any requirement in any environment. So to define a provider for the local environment, you just need to add it like this:, (*8)

``` php 'providers' => [ 'local' => [ Provider\Package\SomeServiceProvider::class, ], ],, (*9)


In case you need to load this provider in multiple environments like local, testing and development, you can do so like this: ``` php 'providers' => [ 'local,testing,development' => [ Provider\Package\SomeServiceProvider::class, ], ],

You can also do any kind of combinations in configuration like this:, (*10)

php 'providers' => [ 'local,testing,development' => [ Provider\Package\SomeServiceProvider::class, ], 'development' => [ Provider\Package\OtherServiceProvider::class, ], 'staging,production' => [ Provider\Package\AnotherServiceProvider::class, ], ],, (*11)

License

The MIT License (MIT). Please see License File for more information., (*12)

The Versions

18/03 2018

dev-master

9999999-dev https://github.com/meSingh/laravel-env-packages

This package lets you define various package requirements according to the environment.

  Sources   Download

MIT

The Requires

 

laravel mesingh envpackages

03/05 2017

dev-analysis-qoMdx7

dev-analysis-qoMdx7 https://github.com/meSingh/laravel-env-packages

This package lets you define various package requirements according to the environment.

  Sources   Download

MIT

The Requires

 

laravel mesingh envpackages

03/05 2017

v1.0.0-beta

1.0.0.0-beta https://github.com/meSingh/laravel-env-packages

This package lets you define various package requirements according to the environment.

  Sources   Download

MIT

The Requires

 

laravel mesingh envpackages