/** * Update the Administration - Job Education. * * @Patch("admin/qualifications/educations") * * @param EducationRequest $request * @return \Illuminate\Http\RedirectResponse * @author Bertrand Kintanar */ public function update(EducationRequest $request) { $education = $this->education->whereId($request->get('education_id'))->first(); if (!$education) { return redirect()->to($request->path())->with('danger', UNABLE_RETRIEVE_MESSAGE); } try { $education->update($request->all()); } catch (Exception $e) { return redirect()->to($request->path())->with('danger', UNABLE_UPDATE_MESSAGE); } return redirect()->to($request->path())->with('success', SUCCESS_UPDATE_MESSAGE); }