public function bulkDelete(Request $request)
    {
        // check if user has permissions to access this link
        if(!User::hasAccess('Categories', 'delete')) {
            return $this->noPermission();
        }

        // if there are no item selected
        if (count($request->all()) <= 0) {
            return $this->response('Please select items to be deleted', 500);
        }

        // loop throw the items
        foreach ($request->all() as $id) {
            $categoryDeleteRes = $this->deleteCategory($id);
            if(gettype($categoryDeleteRes) == "boolean") {
                if(!$categoryDeleteRes) {
                    return $this->response('Category could not be deleted.', 500);
                }
            }else{
                return $categoryDeleteRes;
            }
        }

        return $this->response('Selected categories are successfully deleted');
    }