Skip to content

Commit

Permalink
Update Controller.php
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe authored Jan 7, 2017
1 parent 3050ded commit 7c98000
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions framework/console/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,16 @@ public function prompt($text, $options = [])
/**
* Asks user to confirm by typing y or n.
*
* A typical usage looks like the following:
*
* ```php
* if ($this->confirm("Are you sure?")) {
* echo "user typed yes\n";
* } else {
* echo "user typed no\n";
* }
* ```
*
* @param string $message to echo out before waiting for user input
* @param bool $default this value is returned if no selection is made.
* @return bool whether user confirmed.
Expand Down

0 comments on commit 7c98000

Please sign in to comment.