/** * Update the specified brewery in storage. * * @param int $id * @return Response */ public function update($id) { $brewery = Brewery::findOrFail($id); $validator = Validator::make($data = Input::all(), Brewery::$rules); if ($validator->fails()) { return Redirect::back()->withErrors($validator)->withInput(); } $brewery->update($data); return Redirect::route('breweries.index'); }