-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maxim Lanin
committed
Nov 29, 2015
1 parent
f01289e
commit cf5406b
Showing
5 changed files
with
79 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,4 +106,4 @@ abstract public function preview($results); | |
* @return bool | ||
*/ | ||
abstract public function finish($results); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php namespace Lanin\Laravel\SetupWizard\Support\Bootstrap; | ||
|
||
use Dotenv; | ||
use InvalidArgumentException; | ||
use Illuminate\Contracts\Foundation\Application; | ||
|
||
class DetectEnvironment | ||
{ | ||
/** | ||
* Bootstrap the given application. | ||
* | ||
* @param \Illuminate\Contracts\Foundation\Application $app | ||
* @return void | ||
*/ | ||
public function bootstrap(Application $app) | ||
{ | ||
try { | ||
Dotenv::makeMutable(); | ||
Dotenv::load($app->environmentPath(), $app->environmentFile()); | ||
Dotenv::makeImmutable(); | ||
} catch (InvalidArgumentException $e) { | ||
// | ||
} | ||
|
||
$app->detectEnvironment(function () { | ||
return env('APP_ENV', 'production'); | ||
}); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/Support/LoadConfiguration.php → src/Support/Bootstrap/LoadConfiguration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters