This commit is contained in:
unknown 2023-09-09 20:29:21 +08:00
parent a8f8178bb6
commit 8d2590c869

View File

@ -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'],