cxhxy/app/api/controller/food/Category.php
test_service d3170b4d1c 1
2023-12-01 15:43:29 +08:00

21 lines
429 B
PHP

<?php
namespace app\api\controller\food;
use app\api\controller\food\Controller;
use app\api\model\food\Category as CategoryModel;
/**
* 商品分类控制器
*/
class Category extends Controller
{
/**
* 全部分类
*/
public function index()
{
$list = array_values(CategoryModel::getCacheTree($this->shop_id));
return $this->renderSuccess(compact('list'));
}
}