PHP code example of sebastiaanluca / laravel-conditional-providers

1. Go to this page and download the library: Download sebastiaanluca/laravel-conditional-providers library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sebastiaanluca / laravel-conditional-providers example snippets


'providers' => [

    Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,

]

public function register()
{
    if ($this->app->environment() !== 'production') {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
}

'providers' => [

    // Contains your global providers which will load in any environment

],

'local_providers' => [

    // Contains your 'local' environment providers

    // Mostly used to load debug helpers, optimization tools, et cetera

    Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
    Barryvdh\Debugbar\ServiceProvider::class,

],

'production_providers' => [

    // Contains your 'production' environment providers

    // Great for when you only want to get analytics or
    // bug reports in production and disable the provider
    // entirely when developing.

],

'aliases' => [

    // Contains your global aliases which will load in any environment

],

'local_aliases' => [

    // Contains your 'local' environment aliases/facades

    'Debugbar' => Barryvdh\Debugbar\Facade::class,

],

'production_aliases' => [

    // Contains your 'production' environment aliases/facades

],