PHP code example of unnutz / laravel-environment-config

1. Go to this page and download the library: Download unnutz/laravel-environment-config 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/ */

    

unnutz / laravel-environment-config example snippets




// ...

$app->singleton(
    Illuminate\Contracts\Http\Kernel::class,
    App\Http\Kernel::class
);

$app->singleton(
    Illuminate\Contracts\Console\Kernel::class,
    App\Console\Kernel::class
);

$app->singleton(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    App\Exceptions\Handler::class
);

// TODO: INSERT THESE TWO LINES
if (class_exists('Unnutz\LaravelEnvironmentConfig\Listeners\LoadConfigurationEventListener'))
    app('events')->subscribe('Unnutz\LaravelEnvironmentConfig\Listeners\LoadConfigurationEventListener');



return [

    'providers' => append_config([
        
        // additional service providers can be loaded here
    ]),

];