diff --git a/src/Illuminate/Foundation/Console/DownCommand.php b/src/Illuminate/Foundation/Console/DownCommand.php index 1d97b920f0c0..50f8a6d1d14f 100644 --- a/src/Illuminate/Foundation/Console/DownCommand.php +++ b/src/Illuminate/Foundation/Console/DownCommand.php @@ -29,7 +29,7 @@ class DownCommand extends Command /** * Execute the console command. * - * @return void + * @return int */ public function handle() { @@ -37,12 +37,14 @@ public function handle() file_put_contents(storage_path('framework/down'), json_encode($this->getDownFilePayload(), JSON_PRETTY_PRINT)); + $this->comment('Application is now in maintenance mode.'); } catch (Exception $e) { - $this->error('Application is failed to enter maintenance mode.'); + $this->error('Failed to enter maintenance mode.'); + $this->error($e->getMessage()); - return false; + return 1; } } diff --git a/src/Illuminate/Foundation/Console/UpCommand.php b/src/Illuminate/Foundation/Console/UpCommand.php index 61ee094b9f0d..9f659920833e 100644 --- a/src/Illuminate/Foundation/Console/UpCommand.php +++ b/src/Illuminate/Foundation/Console/UpCommand.php @@ -24,7 +24,7 @@ class UpCommand extends Command /** * Execute the console command. * - * @return void + * @return int */ public function handle() { @@ -34,13 +34,16 @@ public function handle() return true; } + unlink(storage_path('framework/down')); + $this->info('Application is now live.'); } catch (Exception $e) { - $this->error('Application is failed to up.'); + $this->error('Failed to disable maintenance mode.'); + $this->error($e->getMessage()); - return false; + return 1; } } }