Skip to content

Commit

Permalink
Update artisan down output to say if app is already down (#30422)
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev authored and taylorotwell committed Oct 26, 2019
1 parent 689a597 commit 2629b28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Illuminate/Foundation/Console/DownCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ class DownCommand extends Command
public function handle()
{
try {
if (file_exists(storage_path('framework/down'))) {
$this->comment('Application is already down.');

return true;
}

file_put_contents(storage_path('framework/down'),
json_encode($this->getDownFilePayload(),
JSON_PRETTY_PRINT));
Expand Down

0 comments on commit 2629b28

Please sign in to comment.