PHP code example of sven / env-providers

1. Go to this page and download the library: Download sven/env-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/ */

    

sven / env-providers example snippets


// config/app.php
'providers' => [
    ...
    Sven\EnvProviders\ServiceProvider::class,
];

return [
    'environments' => [
        'dev' => ['local', 'development', 'dev'],
        'prod' => ['production'],
    ],
    
    'groups' => [
        'dev' => [
            'providers' => [
                Sven\ArtisanView\ArtisanViewServiceProvider::class,
                Barryvdh\Debugbar\ServiceProvider::class,
            ],
            'aliases' => [
                'Debugbar' => Barryvdh\Debugbar\Facade::class,
            ],
        ],
        'prod' => [
            'providers' => [ /* ... */ ],
            'aliases' => [ /* ... */ ],
        ],
        '*' => [
            'providers' => [ /* ... */ ],
            'aliases' => [ /* ... */ ],
        ],
    ],
    
],
bash
$ php artisan vendor:publish --provider="Sven\EnvProviders\ServiceProvider"