From 8d2590c86967a0b172ff45a837bbea6080cc60d9 Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Sat, 9 Sep 2023 20:29:21 +0800 Subject: [PATCH] update --- app/api/controller/ContractController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/ContractController.php b/app/api/controller/ContractController.php index 80b1b175..9a0f7c7b 100644 --- a/app/api/controller/ContractController.php +++ b/app/api/controller/ContractController.php @@ -80,7 +80,7 @@ class ContractController extends BaseApiController $cars = json_decode($contract['cars_info'], true); $data = []; foreach($cars as $v){ - $hasCar = VehicleRent::where('car_id',$v['id'])->find(); + $hasCar = VehicleRent::where('car_id',$v['id'])->findOrEmpty(); if($hasCar->isEmpty()){ $data[] = [ 'car_id' => $v['id'],