Example #1
0
 /**
  * Update the Administration - Job Skill.
  *
  * @Patch("admin/qualifications/skills")
  *
  * @param SkillRequest $request
  * @return \Illuminate\Http\RedirectResponse
  * @author Bertrand Kintanar
  */
 public function update(SkillRequest $request)
 {
     $skill = $this->skill->whereId($request->get('skill_id'))->first();
     if (!$skill) {
         return redirect()->to($request->path())->with('danger', UNABLE_RETRIEVE_MESSAGE);
     }
     try {
         $skill->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);
 }