soyhuce/service-provider-registrar

Load other service providers based on current environment

1.6.0 2024-03-08 15:39 UTC

This package is auto-updated.

Last update: 2024-11-08 16:59:53 UTC


README

Latest Version on Packagist Total Downloads

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.