infinety-es/custom-providers is a Laravel package for load custom laravel service providers.
It currently has 0 GitHub stars and 13 downloads on Packagist (latest version 1.0).
Install it with composer require infinety-es/custom-providers.
Discover more Laravel packages by infinety-es
or browse all Laravel packages to compare alternatives.
Last updated
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.