コード例 #1
0
 /**
  * Detect if a custom environment file matching the APP_ENV exists.
  *
  * @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $app
  *
  * @return void
  */
 protected function checkForSpecificEnvironmentFile($app)
 {
     if (php_sapi_name() == 'cli') {
         $input = new ArgvInput();
         if ($input->hasParameterOption('--env')) {
             $file = $app->environmentFile() . '.' . $input->getParameterOption('--env');
             $this->loadEnvironmentFile($app, $file);
         }
     }
     if (!env('APP_ENV')) {
         return;
     }
     if (empty($file)) {
         $file = $app->environmentFile() . '.' . env('APP_ENV');
         $this->loadEnvironmentFile($app, $file);
     }
 }