コード例 #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(Entity $entity, Request $request)
 {
     $input = array_except($request->all(), ['_method', '_token']);
     $entity->update($input);
     Cache::flush();
     return redirect()->route('entities.show', $entity->id)->with('message', 'Entity updated.');
 }