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')) {
|
||||
|
26
app/View/Components/adminfooter.php
Normal file
26
app/View/Components/adminfooter.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class adminfooter extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.adminfooter');
|
||||
}
|
||||
}
|
26
app/View/Components/adminheader.php
Normal file
26
app/View/Components/adminheader.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class adminheader extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.adminheader');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user