WokerTask/app/api/controller/CategoryBusinessController.php

29 lines
592 B
PHP
Raw Normal View History

2023-12-27 14:06:33 +08:00
<?php
namespace app\api\controller;
use app\common\model\category_business\CategoryBusiness;
/**
* 商机分类
* Class SmsController
* @package app\api\controller
*/
class CategoryBusinessController extends BaseApiController
{
public array $notNeedLogin = ['list'];
/**
*/
public function list()
{
$lists = CategoryBusiness::field(['id', 'name', 'pid', 'sort', 'status'])
->order(['id' => 'desc'])
->select()
->toArray();
return $this->success('操作成功',linear_to_tree($lists, 'children'));
}
}