From d928ca152376294d98475b3ba84db94144439dcc Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Mon, 10 Apr 2023 11:59:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E4=B8=BA=E5=A4=9A=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/model/system/SystemRouteCate.php | 2 +- crmeb/app/services/system/SystemRouteServices.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crmeb/app/model/system/SystemRouteCate.php b/crmeb/app/model/system/SystemRouteCate.php index c8137e906..354960a74 100644 --- a/crmeb/app/model/system/SystemRouteCate.php +++ b/crmeb/app/model/system/SystemRouteCate.php @@ -37,7 +37,7 @@ class SystemRouteCate extends BaseModel * @email 136327134@qq.com * @date 2023/4/7 */ - public function childrenList() + public function children() { return $this->hasMany(SystemRoute::class, 'cate_id', 'id')->field(['id', 'cate_id', 'name', 'path', 'method'])->order('add_time desc'); } diff --git a/crmeb/app/services/system/SystemRouteServices.php b/crmeb/app/services/system/SystemRouteServices.php index 852427960..f11ea60d3 100644 --- a/crmeb/app/services/system/SystemRouteServices.php +++ b/crmeb/app/services/system/SystemRouteServices.php @@ -83,7 +83,7 @@ class SystemRouteServices extends BaseServices { $list = app()->make(SystemRouteCateServices::class) ->selectList(['app_name' => $appName], '*', 0, 0, 'id asc,sort desc', [ - 'childrenList' => function ($query) use ($where) { + 'children' => function ($query) use ($where) { $query->where('app_name', $where['app_name']) ->when('' !== $where['name_like'], function ($q) use ($where) { $q->where('name|path', 'LIKE', '%' . $where['name_like'] . '%');