public function destroy(CategoryGroup $categoryGroup, Category $category): JsonResponse
    {
        $categories = $categoryGroup->categories()->descendantsAndSelf(
            $category->id
        );

        foreach ($categories as $item) {
            $item->delete();
        };

        $this->clearCache();

        return response()->json([
            'state' => 'success',
        ]);
    }