/** * delete a specific post * * @param Request $request * @return \Illuminate\Http\RedirectResponse */ public function postRemovePost(Request $request) { $post = Post::find($request->get('id')); $post->delete(); return redirect('user/my-posts')->with('success', 'Post Successfully Deleted'); }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($cat_id, $id) { $post = Post::find($id); return view('user.posts.show', ['post' => $post]); }