/** * Update the specified photo in the database. * * @param int $albumId Id of the album * @param int $photoId Id of the photo * @return \Illuminate\View\View */ public function update($albumId, $photoId) { $input = \Input::except('_method'); $validation = new Validators\Photo($input); if ($validation->passes()) { $this->photo->update($photoId, $input); return \Redirect::route("gallery.album.photo.show", array('albumId' => $albumId, 'photoId' => $photoId)); } else { return \Redirect::route("gallery.album.photo.edit", array('albumId' => $albumId, 'photoId' => $photoId))->withInput()->withErrors($validation->errors)->with('message', \Lang::get('gallery::gallery.errors')); } }