/** * Questions used for login * @return void */ protected function loginQuestions() { $login = $this->command->ask('What is the username or email of the user?'); $password = $this->command->secret('What is the password of the user? (hidden)'); $this->login = $login; $this->password = $password; }
/** * @return string */ private function askForPasswordConfirmation() { do { $passwordConfirmation = $this->command->secret('Please confirm your password'); if ($passwordConfirmation == '') { $this->command->error('Password confirmation is required'); } } while (!$passwordConfirmation); return $passwordConfirmation; }
public function renderCommandField(Command $command) { while (true) { $input = $command->secret($this->getConsoleLabel()); $validator = $this->getValidator($input); if ($validator->passes()) { return $input; } else { $command->error($validator->errors()->first()); } } }