Beispiel #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param SkillRequest $request
  * @param  string      $id
  * @return \Illuminate\Http\Response
  */
 public function update(SkillRequest $request, $id)
 {
     $data = $request->all();
     $obj = $this->repository->find($id);
     $this->repository->update($data, $obj->id);
     return redirect()->route('admin.skill.index');
 }
Beispiel #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param SkillRequest $request
  * @param  string      $id
  * @return \Illuminate\Http\Response
  */
 public function update(SkillRequest $request, $id)
 {
     $skill = $this->skills->find($id);
     $skill->update($request->all());
     if ($request->hasFile('image') && $skill) {
         $skill->addImage($request->file('image'), 'small', $skill->id . '-skill.png');
     }
     return redirect()->route('admin.skill.index');
 }