public function categoryLists ($categories=[],$parent=false)
    {
        $data = [];
        $categories=(count($categories)==0 && !$parent)?$this->rootCategories():$categories;

        if(count($categories)>0){
            foreach ($categories as $category) {
                $data[] = [
                    'id' => $category->id ,
                    'title' => $category->title ,
                    'slug' => $category->slug ,
                    'parent' => $category->parent ,
                    'children' => $this->categoryLists($category->child(),true) ,
                ];
            }
        }
        return $data;
    }