public function updatePatientinfo(Request $request) { try { $patient = new Patient(); $patient->patientId = $request->patientId; $patient->strFirstName = $request->strFirstName; $patient->strMiddleName = $request->strMiddleName; $patient->strLastName = $request->strLastName; $patient->strContactNo = $request->strContactNo; $patient->txtAddress = $request->txtAddress; $patient->dateBirthday = $request->dateBirthday; $strStatus = $patient->updatePatient(); } catch (Exception $e) { dd($e); $strStatus = "error"; } if ($strStatus === "success") { return redirect()->action('PatientController@getAllPatient'); } }