public static function filterCategoriesByParentName($query, $name) {
        $obj = \Delatbabel\NestedCategories\Models\Category::where('name', $name)
            ->whereNull('parent_id')
            ->first();
        if ($obj) {
            $query->where('parent_id', $obj->id);
        } else {
            $query->where('name', $name);
        }
    }