From 74a8c52885a3a2ef9da52b32399a011fd11ad84a Mon Sep 17 00:00:00 2001 From: Paras Suthar Darji Date: Mon, 13 Dec 2021 17:29:11 +0530 Subject: [PATCH] Production checking changed from config('app.key') to config('app.env') I think this is better to check with APP_ENV instead of APP_KEY because in local as well this is going to show application is in production let me know your throughts on this Thanks --- .../Installers/Scripts/ProtectInstaller.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/Litepie/Install/Installers/Scripts/ProtectInstaller.php b/src/Litepie/Install/Installers/Scripts/ProtectInstaller.php index 9212f440..68d40ba7 100644 --- a/src/Litepie/Install/Installers/Scripts/ProtectInstaller.php +++ b/src/Litepie/Install/Installers/Scripts/ProtectInstaller.php @@ -4,24 +4,10 @@ use Exception; use Illuminate\Console\Command; -use Illuminate\Filesystem\Filesystem; use Litepie\Install\Installers\SetupScript; class ProtectInstaller implements SetupScript { - /** - * @var Filesystem - */ - protected $finder; - - /** - * @param Filesystem $finder - */ - public function __construct(Filesystem $finder) - { - $this->finder = $finder; - } - /** * Fire the install script. * @@ -33,9 +19,7 @@ public function __construct(Filesystem $finder) */ public function fire(Command $command) { - $currentKey = config('app.key'); - - if (strlen($currentKey) !== 0) { + if (config('app.env')=='production') { $command->alert('Application In Production!'); if (!$command->confirm('Do you really wish to continue the installation?')) {