From ccafcc58016947fc9ca267e484657a2d119b54d5 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Mon, 28 Feb 2022 09:46:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BF=9B=E8=B4=A7=E8=A1=A5?= =?UTF-8?q?=E8=B4=B4=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Controllers/DealerPurchaseLogController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Admin/Controllers/DealerPurchaseLogController.php b/app/Admin/Controllers/DealerPurchaseLogController.php index e083b976..ad8357eb 100644 --- a/app/Admin/Controllers/DealerPurchaseLogController.php +++ b/app/Admin/Controllers/DealerPurchaseLogController.php @@ -26,7 +26,9 @@ class DealerPurchaseLogController extends AdminController // dd($phone); if ($phone) { $user = User::where('phone', $phone)->first(); - $grid->model()->where('path', 'like', '%-'.$user->id.'-%'); + if ($user) { + $grid->model()->where('path', 'like', '%-'.$user->id.'-%'); + } } $grid->model()->orderBy('id', 'desc');//默认ID倒叙 $grid->column('id')->sortable();