コード例 #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  Exercise $exercise
  * @return Response
  */
 public function update(Request $request, Exercise $exercise)
 {
     $this->validate($request, $this->rules);
     $input = array_except(Input::all(), '_method');
     $exercise->update($input);
     return Redirect::route('exercises.show', $exercise->slug)->with('message', 'Exercise updated');
 }