@@ 48-56 (lines=9) @@ | ||
45 | * @param int $id |
|
46 | * @return \Illuminate\Http\Response |
|
47 | */ |
|
48 | public function update($id, Request $request) |
|
49 | { |
|
50 | return $this->respondWithItem($this->model, function ($model) use ($id, $request) { |
|
51 | $item = $model->findOrFail($id); |
|
52 | $item->fill($request->all()); |
|
53 | $item->save(); |
|
54 | return $item; |
|
55 | }); |
|
56 | } |
|
57 | /** |
|
58 | * Remove the specified resource from storage. |
|
59 | * |
@@ 17-25 (lines=9) @@ | ||
14 | * @param int $id |
|
15 | * @return \Illuminate\Http\Response |
|
16 | */ |
|
17 | public function update($id, Request $request) |
|
18 | { |
|
19 | return $this->respondWithItem($this->model, function ($model) use ($id, $request) { |
|
20 | $item = $model->findOrFail($id); |
|
21 | $item->fill($request->all()); |
|
22 | $item->save(); |
|
23 | return $item; |
|
24 | }); |
|
25 | } |
|
26 | } |
|
27 |