From a6dc7589bfd09becca241e467b57000d9906c5e1 Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Mon, 7 Jul 2025 15:01:06 +0800 Subject: [PATCH] update --- app/Http/Controllers/Admin/BaseController.php | 2 +- app/Http/Controllers/Admin/EmailTemplateController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Admin/BaseController.php b/app/Http/Controllers/Admin/BaseController.php index b2b2918..0ca5e2a 100755 --- a/app/Http/Controllers/Admin/BaseController.php +++ b/app/Http/Controllers/Admin/BaseController.php @@ -50,7 +50,7 @@ class BaseController extends CommonController public function index() { $all = request()->all(); - $list = $this->model->withCount('emailRecords')->with(underlineToHump($all['show_relation'] ?? []))->where(function ($query) use ($all) { + $list = $this->model->with(underlineToHump($all['show_relation'] ?? []))->where(function ($query) use ($all) { if (isset($all['filter']) && !empty($all['filter'])) { foreach ($all['filter'] as $condition) { $key = $condition['key'] ?? null; diff --git a/app/Http/Controllers/Admin/EmailTemplateController.php b/app/Http/Controllers/Admin/EmailTemplateController.php index 72048d1..62b689d 100644 --- a/app/Http/Controllers/Admin/EmailTemplateController.php +++ b/app/Http/Controllers/Admin/EmailTemplateController.php @@ -54,7 +54,7 @@ class EmailTemplateController extends BaseController public function index() { $all = request()->all(); - $list = $this->model->where(function ($query) use ($all) { + $list = $this->model->withCount('emailRecords')->where(function ($query) use ($all) { if (isset($all['filter']) && !empty($all['filter'])) { foreach ($all['filter'] as $condition) { $key = $condition['key'] ?? null;