diff --git a/Modules/Appointment/app/Http/Controllers/AppointmentController.php b/Modules/Appointment/app/Http/Controllers/AppointmentController.php index 098751e..2a7a1de 100644 --- a/Modules/Appointment/app/Http/Controllers/AppointmentController.php +++ b/Modules/Appointment/app/Http/Controllers/AppointmentController.php @@ -47,9 +47,8 @@ class AppointmentController extends Controller $validated = $request->validated(); $this->appointmentRepository->storeAppointmentList($validated); - toastr()->success('Appointment created successfully.'); + return redirect("/thankyou")->with('success','Message Sent Successfully'); - return redirect()->route('doctor_provider'); } catch (\Throwable $th) { report($th); toastr()->error('Something went wrong.'); diff --git a/Modules/Appointment/app/Http/Requests/CreateAppointmentRequest.php b/Modules/Appointment/app/Http/Requests/CreateAppointmentRequest.php index 60ff437..e9c55c9 100644 --- a/Modules/Appointment/app/Http/Requests/CreateAppointmentRequest.php +++ b/Modules/Appointment/app/Http/Requests/CreateAppointmentRequest.php @@ -15,12 +15,37 @@ class CreateAppointmentRequest extends FormRequest 'team_member_id' => 'required|integer', 'full_name' => 'required|string|max:150', 'email' => 'required|email', - 'contact_no' => 'required|string', + 'contact_no' => ['required','nullable','regex:/^\+?\d{7,15}$/'], 'subject' => 'required|string|max:500', 'feedback' => 'required|string', ]; } + public function messages() + { + return [ + 'team_member_id.required' => 'The team member field is required.', + 'team_member_id.integer' => 'The team member must be an integer.', + + 'full_name.required' => 'The full name field is required.', + 'full_name.string' => 'The full name must be a string.', + 'full_name.max' => 'The full name may not be greater than 150 characters.', + + 'email.required' => 'The email field is required.', + 'email.email' => 'Invalid email format.', + + 'contact_no.required' => 'The contact number field is required.', + 'contact_no.regex' => 'The contact number must be a valid phone number', + + 'subject.required' => 'The subject field is required.', + 'subject.string' => 'The subject must be a string.', + 'subject.max' => 'The subject may not be greater than 500 characters.', + + 'feedback.required' => 'The feedback field is required.', + 'feedback.string' => 'The feedback must be a string.', + ]; + } + /** * Determine if the user is authorized to make this request. */ diff --git a/Modules/Consultation/app/Http/Requests/CreateConsultationRequest.php b/Modules/Consultation/app/Http/Requests/CreateConsultationRequest.php index 41ff6b3..3cf9704 100644 --- a/Modules/Consultation/app/Http/Requests/CreateConsultationRequest.php +++ b/Modules/Consultation/app/Http/Requests/CreateConsultationRequest.php @@ -36,7 +36,7 @@ class CreateConsultationRequest extends FormRequest 'email.max' => 'The email may not be greater than :max characters.', 'contact_no.required' => 'The contact number field is required.', - 'contact_no.max' => 'The contact number may not be greater than :max characters.', + 'contact_no.regex' => 'The contact number must be a valid phone number', 'age_group.required' => 'The age group field is required.', 'age_group.integer' => 'The age group must be an integer.', diff --git a/Modules/ContactUs/app/Http/Requests/CreateContactUsRequest.php b/Modules/ContactUs/app/Http/Requests/CreateContactUsRequest.php index f8b4b5b..c66dde8 100644 --- a/Modules/ContactUs/app/Http/Requests/CreateContactUsRequest.php +++ b/Modules/ContactUs/app/Http/Requests/CreateContactUsRequest.php @@ -17,7 +17,7 @@ class CreateContactUsRequest extends FormRequest 'email' => 'sometimes|nullable|email', 'subject' => 'sometimes|nullable|string|max:1000', 'message' => 'required|string|max:1000', - 'phone' => 'sometimes|nullable|numeric|digits:10', + 'phone' => ['sometimes','nullable','regex:/^\+?\d{7,15}$/'], ]; } @@ -42,7 +42,8 @@ class CreateContactUsRequest extends FormRequest 'message.max' => 'The message may not be greater than 1000 characters.', 'phone.numeric' => 'The phone must be a number.', - 'phone.digits' => 'The phone must be exactly 10 digits long.' + 'phone.digits_between' => 'The phone must be a number between 7 and 15 digits long.', + ]; } diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 42aba49..b5c2cc8 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -223,8 +223,8 @@ class HomeController extends Controller $validated = ['email' => $request->email]; $this->subscriptionService->storeSubscription($validated); - toastr()->success('Thanks for subscribing'); - return back(); + // toastr()->success('Thanks for subscribing'); + return redirect("/thankyou")->with('success','Message Sent Successfully'); } public function storeContactUs(CreateContactUsRequest $request) @@ -247,8 +247,8 @@ class HomeController extends Controller try { $consultationController = new ConsultationController(); $consultationController->store($request); - toastr()->success('Thanks for consulting us...'); - return back(); + // toastr()->success('Thanks for consulting us...'); + return redirect("/thankyou")->with('success','Message Sent Successfully'); } catch (\Throwable $th) { report($th); } diff --git a/public/images/bye.jpg b/public/images/bye.jpg new file mode 100644 index 0000000..47cf432 Binary files /dev/null and b/public/images/bye.jpg differ diff --git a/public/source/css/custom.css b/public/source/css/custom.css new file mode 100644 index 0000000..7502af8 --- /dev/null +++ b/public/source/css/custom.css @@ -0,0 +1,125 @@ +.ending { + padding: 80px 0; +} + +.ending .last-picture { + text-align: center; +} + +.ending .last-picture img { + width: 20%; + margin: 30px; +} + +.ending .last-text { + margin-top: 18px; + margin-bottom: 30px; + text-align: center; +} + +.ending .last-text h3 { + font-size: 48px; + font-weight: 750; + line-height: 1.2; + color: #3b78af; + margin-bottom: 14px; + max-width: 380px; + margin: 0 auto; +} + +.ending .last-text p { + color: #000; + margin: 40px 0; + margin-bottom: 30px; +} + +.whatsapp-icon { + position: fixed; + bottom: 105px; /* Adjust the distance from the bottom */ + right: 30px; /* Adjust the distance from the right */ + z-index: 1000; /* Ensures it stays on top of other elements */ +} + +.whatsapp-icon img { + width: 65px; /* Adjust the size as needed */ + height: 65px; /* Adjust the size as needed */ +} + +.ending .last-text a { + margin-top: 5px; + border: 1px solid #3b78af; + padding: 15px; + font-weight: 400; + letter-spacing: 1px; + color: #FFFFFF; + background-color: #3b78afe0; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + width: 290px; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + border-radius: 30px; + text-transform: uppercase; + font-size: 14px; +} + +.ending .last-text a:hover { + background: transparent; + color: #3b78af; + font-weight: 400; + text-decoration: none; +} + +.ending .last-text a i { + margin-left: 10px; +} + +.consulation-form div { + padding-bottom: 4px !important; +} + + +/* Make the intl-tel-input container take full width */ +.iti { + display: block !important; + width: 100%; + +} + +/* Make the input inside take full width */ +.iti__selected-dial-code, +.iti__flag-container { + float: left; + height: 100%; + padding-top: 5px; + +} + +/* Input field inside the container */ +.iti__country-list, +.iti__input { + box-sizing: border-box; +} + +/* Optional: spacing below input like other fields */ +.phone-number { + margin-top: 0.25rem; +} + +.contact-us-form .iti .iti__selected-dial-code { + padding-top: 12px !important; /* override for taller inputs */ +} + +.appointment-form-field .iti .iti__selected-dial-code { + padding-top: 2px !important; /* override for taller inputs */ +} + + + + + diff --git a/public/source/images/favicon.png b/public/source/images/favicon.png new file mode 100644 index 0000000..410ca31 Binary files /dev/null and b/public/source/images/favicon.png differ diff --git a/resources/views/thankyou.blade.php b/resources/views/thankyou.blade.php new file mode 100644 index 0000000..127f01a --- /dev/null +++ b/resources/views/thankyou.blade.php @@ -0,0 +1,28 @@ +@extends('theme.spade.layouts.main') +@section('meta') + + + + + + +@endsection +@section('content') + +
Your form has been submitted. We will get back to you shortly
+ Back to the homepage + +Have any questions? Leave us your contact information, and we’ll reach out to you.
-