changes
This commit is contained in:
@@ -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.');
|
||||
|
@@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user