Skip to content

Commit 7b8de7b

Browse files
committed
Adding support for custom environment file locations
1 parent 56a3ba8 commit 7b8de7b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Providers/CoreServiceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,15 @@ public function boot(Dispatcher $dispatcher)
6161
public function register()
6262
{
6363
$this->app->singleton('asgard.isInstalled', function ($app) {
64+
$envFileLocation = "{$app->environmentPath()}/{$app->environmentFile()}";
65+
6466
try {
6567
$hasTable = Schema::hasTable('setting__settings');
6668
} catch (\Exception $e) {
6769
$hasTable = false;
6870
}
6971

70-
return $app['files']->isFile(base_path('.env')) && $hasTable;
72+
return $app['files']->isFile($envFileLocation) && $hasTable;
7173
});
7274

7375
$this->registerCommands();

0 commit comments

Comments
 (0)