From f2070a93c647ded68a8b01641253bdc70439d39b Mon Sep 17 00:00:00 2001 From: Manish Verma Date: Sat, 10 Nov 2018 12:45:21 +0530 Subject: [PATCH] Updated isInstall() method Updated inInstall herlper method to check value of install from config data as env(DB_INSTALL) returns null in some system --- app/Console/Commands/TicketFetch.php | 2 +- app/Http/helpers.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/TicketFetch.php b/app/Console/Commands/TicketFetch.php index a90f10129..549b99b68 100644 --- a/app/Console/Commands/TicketFetch.php +++ b/app/Console/Commands/TicketFetch.php @@ -40,7 +40,7 @@ class TicketFetch extends Command */ public function handle() { - if (env('DB_INSTALL') == 1) { + if (isInstall()) { $controller = $this->mailController(); $emails = new \App\Model\helpdesk\Email\Emails(); $settings_email = new \App\Model\helpdesk\Settings\Email(); diff --git a/app/Http/helpers.php b/app/Http/helpers.php index 589040d74..e97f8fe92 100644 --- a/app/Http/helpers.php +++ b/app/Http/helpers.php @@ -124,7 +124,7 @@ function isInstall() { $check = false; $env = base_path('.env'); - if (\File::exists($env) && env('DB_INSTALL') == 1) { + if (\File::exists($env) && \Config::get('database.install') == 1) { $check = true; }