Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jun 8, 2019
1 parent f849544 commit 9e20849
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/Illuminate/Foundation/Console/DownCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,22 @@ class DownCommand extends Command
/**
* Execute the console command.
*
* @return void
* @return int
*/
public function handle()
{
try {
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;
}
}

Expand Down
9 changes: 6 additions & 3 deletions src/Illuminate/Foundation/Console/UpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class UpCommand extends Command
/**
* Execute the console command.
*
* @return void
* @return int
*/
public function handle()
{
Expand All @@ -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;
}
}
}

0 comments on commit 9e20849

Please sign in to comment.