integarting admin dashboard
This commit is contained in:
@ -60,6 +60,8 @@ class OnboardingConversation extends Conversation
|
||||
{
|
||||
$this->ask('Can you tell us your email?', function (Answer $answer) {
|
||||
$this->email = $answer->getText();
|
||||
|
||||
// Validate Email
|
||||
if (filter_var($this->email, FILTER_VALIDATE_EMAIL)) {
|
||||
$this->say("Your email is " . $this->email);
|
||||
$this->confirmEmail();
|
||||
@ -74,7 +76,7 @@ class OnboardingConversation extends Conversation
|
||||
{
|
||||
$this->ask('Confirm your Email (Y/N):', function (Answer $answer) {
|
||||
$confirmEmail = $answer->getText();
|
||||
if (strtolower($confirmEmail) == 'y') {
|
||||
if (strtolower($confirmEmail) == 'y' || strtolower($confirmEmail) == 'yes') {
|
||||
$this->say("We got your details. Thank you!");
|
||||
|
||||
// Save the details to the database
|
||||
@ -83,7 +85,7 @@ class OnboardingConversation extends Conversation
|
||||
'phone_number' => $this->phoneNumber,
|
||||
'email' => $this->email,
|
||||
]);
|
||||
} elseif (strtolower($confirmEmail) == 'n') {
|
||||
} elseif (strtolower($confirmEmail) == 'n' || strtolower($confirmEmail) == 'no') {
|
||||
$this->say("Please confirm your email.");
|
||||
$this->askEmail(); // Re-ask for the email
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user