Skip to content

Instantly share code, notes, and snippets.

@eS-IT
Last active June 13, 2020 15:13
Show Gist options
  • Save eS-IT/0a6cbfd593f03f37d9b96be9251414da to your computer and use it in GitHub Desktop.
Save eS-IT/0a6cbfd593f03f37d9b96be9251414da to your computer and use it in GitHub Desktop.
<?php
$this->io->askHidden('What is your password?');
// validation:
$this->io->askHidden('What is your password?', function ($password) {
if (empty($password)) {
throw new \RuntimeException('Password cannot be empty.');
}
return $password;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment