App\Http\Controllers\Laralum\CommentsController::destroy PHP Method

destroy() public method

public destroy ( $id )
    public function destroy($id)
    {
        Laralum::permissionToAccess('laralum.posts.comments');
        $comment = Laralum::comment('id', $id);
        $post = $comment->post;
        # Check blog permissions
        Laralum::mustHaveBlog($post->blog->id);
        $comment->delete();
        return redirect()->route('Laralum::posts', ['id' => $post->id])->with('success', trans('laralum.msg_comment_deleted'));
    }