/**
  * Update the specified resource in storage.
  *
  * @param  PostFormRequest $request
  * @param  Post $post
  * @return Response
  */
 public function update(PostFormRequest $request, $post)
 {
     $post->fill($request->all());
     $post->save();
     if ($tags = $request->input('tags')) {
         $post->retag($request->input('tags'));
     }
     return $post->load('tagged');
 }
Ejemplo n.º 2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  PostFormRequest $request
  * @param  int $id
  * @return Response
  */
 public function update(PostFormRequest $request, $id)
 {
     Post::find($id)->update($request->all());
     return redirect()->to('admin/post')->with('message', 'success');
 }