Package Data | |
---|---|
Maintainer Username: | Krato1 |
Maintainer Contact: | eric@infinety.es (Eric Lagarda) |
Package Create Date: | 2016-06-09 |
Package Last Update: | 2016-06-09 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-09 15:00:26 |
Package Statistics | |
---|---|
Total Downloads: | 8 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This package allows you to configure the environment certain service providers and aliases are loaded in.
Via composer:
$ composer require infinety-es/custom-providers
Or add the package to your dependencies in composer.json
and run
composer update
to download the package:
{
"require": {
"infinety-es/custom-providers": "^1.0"
}
}
Next, add the CustomServiceProvider
to your providers
array in config/app.php
:
// config/app.php
'providers' => [
...
Infinety\CustomProviders\CustomServiceProvider::class,
];
You must publish this package's configuration file for it to work correctly. To do so, run the following command:
$ php artisan vendor:publish --provider="Infinety\CustomProviders\CustomServiceProvider"
After that, you should have see the file config/providers.php
.
In the environments
array you can define what environments the provider group
should respond to. You may use an asterisk (*
) to make that group's providers
and aliases load regardless of the application's environment.
Note: You can set your application's environment in either config/app.php
under env
or via your .env
file.
The providers
array is where you can put the providers you want to have loaded in the defined environments. This should be pretty straight forward as it is the same as how you would register service providers in config/app.php
.
In the aliases
array you may put all the aliases (facades) you want to register.
As with the providers, this is the same as how you would register aliases in the default config/app.php
configuration file.
All contributions (in the form on pull requests, issues and feature-requests) are welcome. See the contributors page for all contributors.
MIT License (MIT). Please see the license file for more information.