Skip to content

Commit

Permalink
Update BaseConsole.php
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe authored Jan 7, 2017
1 parent 92270bc commit 3050ded
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions framework/helpers/BaseConsole.php
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,16 @@ public static function prompt($text, $options = [])
/**
* Asks user to confirm by typing y or n.
*
* A typical usage looks like the following:
*
* ```php
* if (Console::confirm("Are you sure?")) {
* echo "user typed yes\n";
* } else {
* echo "user typed no\n";
* }
* ```
*
* @param string $message to print 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 3050ded

Please sign in to comment.