/**
  * Update the specified resource in storage.
  *
  * @param  int         $id
  * @param  PostRequest $request
  *
  * @return Response
  */
 public function update($id, PostRequest $request)
 {
     $post = $this->post->find($id);
     if (is_null($post)) {
         return redirect()->route('post.index')->with('error', 'Post not found.');
     }
     if ($this->post->update($id, $request->all())) {
         return redirect()->route('post.index', getQueryParams($request->fullUrl()))->with('success', 'Post successfully updated!');
     }
     return redirect('post')->with('error', 'Problem updating Post!');
 }