dlh_test_server/app/api/logic/BusinessSchoolLogic.php

23 lines
572 B
PHP
Raw Normal View History

2024-09-21 10:39:17 +08:00
<?php
namespace app\api\logic;
use app\common\basics\Logic;
use app\common\model\BusinessSchool;
use app\common\model\BusinessSchoolCategory;
class BusinessSchoolLogic extends Logic
{
public static function category()
{
try {
2024-09-21 10:54:10 +08:00
return BusinessSchoolCategory::field(['id', 'name'])
2024-09-21 10:39:17 +08:00
->where([
['del', '=', 0],
['is_show', '=', 1]
2024-09-21 10:54:10 +08:00
])->order('sort asc')->select()->toArray();
2024-09-21 10:39:17 +08:00
} catch (\Exception $e) {
return ['error'=>$e->getMessage()];
}
}
}