/**
* Update the specified resource in storage.
*
* @param int $id
* @return Response
*/
public function update($id)
{
$input = \Input::all();
$validation = \Validator::make($input, $this->getRules());
if ($validation->passes()) {
$record = $this->Model->find($id)->update($input);
return \Redirect::route($this->routeName . 'show', $id);
}
return \Redirect::route($this->routeName . 'edit', $id)->withInput()->withErrors($validation);
}