PHP code example of allysonsilva / laravel-multienv

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

    

allysonsilva / laravel-multienv example snippets


'sorted' => [
    '.envA',
    '.envC',
    '.envB',
],

'domains' => [
    'your-domain.tld' => [
        'env' => '.env.custom-name',
    ],
],

'domains' => [
    'site2.test' => [
        'APP_CONFIG_CACHE' => 'config-site2-test.php',
    ],
],

'domains' => [
    'site2.test' => [
        'APP_ROUTES_CACHE' => 'routes-v7-site2-test.php',
    ],
],
bash
php artisan vendor:publish --tag="envs-config"
diff
    

    namespace App\Http;

    +use Allyson\MultiEnv\Concerns\BootstrappersTrait;
    use Illuminate\Foundation\Http\Kernel as HttpKernel;

    class Kernel extends HttpKernel
    {
    +    use BootstrappersTrait;