soyhuce / service-provider-registrar
Load other service providers based on current environment
Installs: 6 357
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: ^8.2
- illuminate/support: ^10.0 || ^11.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.7
- larastan/larastan: ^2.9.2
- orchestra/testbench: ^8.0 || ^9.0
- phpunit/phpunit: ^10.4
README
Objectives
This package allows to load other service providers based on current environment
Installation
You can install the package via composer:
composer require soyhuce/service-provider-registrar
Make a ServiceProvider which extend Soyhuce\ServiceProviderRegistrar\ServiceProvider
:
namespace App\Providers; use Soyhuce\ServiceProviderRegistrar\ServiceProvider; class RegistrationServiceProvider extends ServiceProvider { }
Don't forget to add this ServiceProvider to your config/app.php
file!
For each environment you wish, you have to define which service provider you want to use:
class RegistrationServiceProvider extends ServiceProvider { public $local = [ \Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class ]; }
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.