Example #1
0
 /**
  * Detect if a custom environment file matching the APP_ENV exists.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  * @return void
  */
 protected function checkForSpecificEnvironmentFile($app)
 {
     if (!env('APP_ENV')) {
         return;
     }
     $file = $app->environmentFile() . '.' . env('APP_ENV');
     if (file_exists($app->environmentPath() . '/' . $file)) {
         $app->loadEnvironmentFrom($file);
     }
 }
Example #2
0
 /**
  * Load a custom environment file.
  *
  * @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $app
  * @param string                                                                      $file
  *
  * @return void
  */
 protected function loadEnvironmentFile($app, $file)
 {
     if (file_exists($app->environmentPath() . '/' . $file)) {
         $app->loadEnvironmentFrom($file);
     }
 }