/** * Update the Administration - Job Employment Status. * * @Patch("admin/job/employment-status") * * @param EmploymentStatusRequest $request * @return \Illuminate\Http\RedirectResponse * @author Bertrand Kintanar */ public function update(EmploymentStatusRequest $request) { $employment_status = $this->employment_status->whereId($request->get('employment_status_id'))->first(); if (!$employment_status) { return redirect()->to($request->path())->with('danger', UNABLE_RETRIEVE_MESSAGE); } try { $employment_status->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); }