integarting admin dashboard
This commit is contained in:
13
app/Http/Controllers/AdminController.php
Normal file
13
app/Http/Controllers/AdminController.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AdminController extends Controller
|
||||
{
|
||||
public function admin()
|
||||
{
|
||||
return view('Dashboard.index');
|
||||
}
|
||||
}
|
@ -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 {
|
||||
|
@ -233,14 +233,6 @@ class MainController extends Controller
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function checkout(Request $data)
|
||||
{
|
||||
if (session()->has('id')) {
|
||||
|
Reference in New Issue
Block a user