user->id) { abort(401); } $postid = $comment->post->id; $comment->delete(); return redirect("/posts/$postid"); } public function deletePost(Post $post) { $post->featured = null; $post->save(); $post->delete(); return redirect()->route('posts.home'); } }