electronics-extreme/laravel-config-env

该包的最新版本(1.1.0)没有可用的许可证信息。

1.1.0 2017-02-06 12:28 UTC

This package is not auto-updated.

Last update: 2024-09-28 19:58:22 UTC


README

使用以下命令安装最新版本:

$ composer require electronics-extreme/laravel-config-env

前往 app/Http/Kernel.php 并使用以下内容覆盖 $bootstrappers

Laravel 5.4

/**
 * The bootstrap classes for the application.
 *
 * @var array
 */
protected $bootstrappers = [
    \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class,
    \ElectronicsExtreme\LaravelConfigEnv\Bootstrap\LoadConfiguration::class,
    \Illuminate\Foundation\Bootstrap\HandleExceptions::class,
    \Illuminate\Foundation\Bootstrap\RegisterFacades::class,
    \Illuminate\Foundation\Bootstrap\RegisterProviders::class,
    \Illuminate\Foundation\Bootstrap\BootProviders::class,
];

laravel 5.3 或以下版本

/**
 * The bootstrap classes for the application.
 *
 * @var array
 */
protected $bootstrappers = [    
    'Illuminate\Foundation\Bootstrap\DetectEnvironment',
    'ElectronicsExtreme\LaravelConfigEnv\Bootstrap\LoadConfiguration',
    'Illuminate\Foundation\Bootstrap\ConfigureLogging',
    'Illuminate\Foundation\Bootstrap\HandleExceptions',
    'Illuminate\Foundation\Bootstrap\RegisterFacades',
    'Illuminate\Foundation\Bootstrap\RegisterProviders',
    'Illuminate\Foundation\Bootstrap\BootProviders',
];

前往 app/Console/Kernel.php 并使用以下内容覆盖 $bootstrappers

laravel 5.4

/**
 * The bootstrap classes for the application.
 *
 * @var array
 */
protected $bootstrappers = [
    \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class,
    \ElectronicsExtreme\LaravelConfigEnv\Bootstrap\LoadConfiguration::class,
    \Illuminate\Foundation\Bootstrap\HandleExceptions::class,
    \Illuminate\Foundation\Bootstrap\RegisterFacades::class,
    \Illuminate\Foundation\Bootstrap\SetRequestForConsole::class,
    \Illuminate\Foundation\Bootstrap\RegisterProviders::class,
    \Illuminate\Foundation\Bootstrap\BootProviders::class,
];

laravel 5.3 或以下版本

/**
 * The bootstrap classes for the application.
 *
 * @var array
 */
protected $bootstrappers = [
    'Illuminate\Foundation\Bootstrap\DetectEnvironment',
    'ElectronicsExtreme\LaravelConfigEnv\Bootstrap\LoadConfiguration',
    'Illuminate\Foundation\Bootstrap\ConfigureLogging',
    'Illuminate\Foundation\Bootstrap\HandleExceptions',
    'Illuminate\Foundation\Bootstrap\RegisterFacades',
    'Illuminate\Foundation\Bootstrap\SetRequestForConsole',
    'Illuminate\Foundation\Bootstrap\RegisterProviders',
    'Illuminate\Foundation\Bootstrap\BootProviders',
];