From cce8fd095ab9ad14476a6d84ab5ddd2486384426 Mon Sep 17 00:00:00 2001 From: Mahesh Sharma Date: Wed, 22 Feb 2023 17:40:19 +0545 Subject: [PATCH] appointment --- .../Admin/AppointmentController.php | 5 ++-- .../Controllers/AppointmentController.php | 6 +++-- app/Http/Controllers/BlogController.php | 2 +- app/Http/Controllers/EnquiryController.php | 1 - .../views/appointment_confirmed.blade.php | 1 + .../appointment_confirmed_for_admin.blade.php | 25 +++++++++++++++++++ resources/views/layout/app.blade.php | 2 +- 7 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 resources/views/appointment_confirmed_for_admin.blade.php diff --git a/app/Http/Controllers/Admin/AppointmentController.php b/app/Http/Controllers/Admin/AppointmentController.php index 4c8ed5b..38b2213 100644 --- a/app/Http/Controllers/Admin/AppointmentController.php +++ b/app/Http/Controllers/Admin/AppointmentController.php @@ -50,7 +50,7 @@ class AppointmentController extends Controller $appointments = $appointments->where('status', $status); } if (\request('is_booked')) { - + $is_booked = (\request('is_booked')) == '1' ? true : false; $appointments = $appointments->where('is_booked', $is_booked); } @@ -107,12 +107,11 @@ class AppointmentController extends Controller public function update(Request $request, $id) { + dd($request->all()); $request->validate([ 'date' => 'required|date', 'start_time' => 'required|date_format:H:i', 'end_time' => 'required|date_format:H:i', - // 'location' => 'required|max:255', - // 'description' => 'required', ]); $start_time = Carbon::createFromFormat('H:i', $request->get('start_time'))->format('H:i A'); $end_time = Carbon::createFromFormat('H:i', $request->get('end_time'))->format('H:i A'); diff --git a/app/Http/Controllers/AppointmentController.php b/app/Http/Controllers/AppointmentController.php index c9eba08..26436ce 100644 --- a/app/Http/Controllers/AppointmentController.php +++ b/app/Http/Controllers/AppointmentController.php @@ -75,7 +75,7 @@ class AppointmentController extends Controller $formated_date = $date->format('M d, Y'); $appointment->is_booked = true; $appointment->save(); - $subject = 'Appointment Confirmed'; + $subject = 'Appointment Booked Successfully.'; dispatch(function() use ($name,$email,$phone,$subject,$formated_date,$appointment) { \Mail::send('appointment_confirmed', array( @@ -100,9 +100,11 @@ class AppointmentController extends Controller $message->subject($subject); $message->to($email, $name)->subject($subject); // $message->cc('extratechweb@gmail.com', 'Extratech')->subject($subject); - // $message->cc('suman@extratechs.com.au', 'Extratech')->subject($subject); + // $message->cc('admin@eteducation.com.au', 'Extratech')->subject($subject); }); + + }); } diff --git a/app/Http/Controllers/BlogController.php b/app/Http/Controllers/BlogController.php index 59b0f62..e01e924 100644 --- a/app/Http/Controllers/BlogController.php +++ b/app/Http/Controllers/BlogController.php @@ -9,7 +9,7 @@ use App\Models\Page; class BlogController extends Controller { public function index(){ - $page = Page::where(['title' => 'Blog','status' => 1])->first(); + $page = Page::where(['title' => 'Blogs','status' => 1])->first(); $blogs = NewsAndUpdate::where('status',1)->get(); return view('blogs',compact('blogs','page')); } diff --git a/app/Http/Controllers/EnquiryController.php b/app/Http/Controllers/EnquiryController.php index 5b1e2b1..f26ba05 100644 --- a/app/Http/Controllers/EnquiryController.php +++ b/app/Http/Controllers/EnquiryController.php @@ -28,7 +28,6 @@ class EnquiryController extends Controller } $marital_status = $request->get('marital_status'); if ($marital_status == 'Widow' || $marital_status == 'Single') { - $request['married_date'] = null; $request['spouse_academics'] = null; $request['spouse_work_experience'] = null; diff --git a/resources/views/appointment_confirmed.blade.php b/resources/views/appointment_confirmed.blade.php index b3fbf5a..f97a637 100644 --- a/resources/views/appointment_confirmed.blade.php +++ b/resources/views/appointment_confirmed.blade.php @@ -19,6 +19,7 @@ Appointment End Time:{{$end_time}}

Your Full Name: {{ $full_name }}

Phone: {{$phone}}

+ diff --git a/resources/views/appointment_confirmed_for_admin.blade.php b/resources/views/appointment_confirmed_for_admin.blade.php new file mode 100644 index 0000000..cf21414 --- /dev/null +++ b/resources/views/appointment_confirmed_for_admin.blade.php @@ -0,0 +1,25 @@ + + + +

Appointment Confirmed

+
+
+
+

Appointment Details

+ Appointment Date: {{$date}}

+ Appointment Start Time: {{$start_time}}

+ Appointment End Time: {{$end_time}}

+ Appointee Full Name: {{ $full_name }}

+ Phone: {{$phone}}

+ Email: {{$email}}

+
+
+ diff --git a/resources/views/layout/app.blade.php b/resources/views/layout/app.blade.php index 565ac5b..fbf9068 100644 --- a/resources/views/layout/app.blade.php +++ b/resources/views/layout/app.blade.php @@ -115,7 +115,7 @@