/** * delete comment by ronak */ public function dlt($id) { $comment = comments::find($id); $postid = $comment->on_post; $slug = posts::find($postid); $slugcontent = $slug->slug; $comment->delete(); return redirect('/posts' . $slugcontent); }