'askUserName' function will be executed in a conversation
public function askUsername()
{
$this->ask('Hello! What is your name?', function(Answer $answer) {
// Save result
$this->username = $answer->getText();
$this->say('Nice to meet you '.$this->username);
$this->askEmail();
});
}
Can I save the data to database right after fetching the value i.e after the code - $this->username = $answer->getText();
Also, want to know how the 'fallback' method will be executed if the response from the database is invalid/error.
Thanks in advance