From 05af7dffb815cfc64b04c3621391345f968fd053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E5=AD=9D=E5=85=B5?= Date: Wed, 29 Mar 2023 11:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=9B=BE=E7=89=87=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=94=AF=E6=8C=81=E9=80=9A=E8=BF=87=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=90=8D=E7=A7=B0=E6=90=9C=E7=B4=A2=E3=80=82?= =?UTF-8?q?Fixed=20#640?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/ImageController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/ImageController.php b/app/Http/Controllers/Admin/ImageController.php index e65f14ab..123d5ad3 100644 --- a/app/Http/Controllers/Admin/ImageController.php +++ b/app/Http/Controllers/Admin/ImageController.php @@ -64,7 +64,9 @@ class ImageController extends Controller }); foreach ($words as $word) { - $builder->where('origin_name', 'like', "%{$word}%")->orWhere('alias_name', 'like', "%{$word}%"); + $builder->where('name', 'like', "%{$word}%") + ->where('origin_name', 'like', "%{$word}%") + ->orWhere('alias_name', 'like', "%{$word}%"); } })->latest()->paginate(40); $images->getCollection()->each(function (Image $image) {