чутка доработки

pull/10/head
Rustem 2025-04-24 00:33:08 +05:00
parent 17c3bfd4fb
commit 72d4bce2da
1 changed files with 4 additions and 0 deletions

View File

@ -139,6 +139,7 @@ class MobileApiController extends Controller
]);
}
$applications = [];
$application = UniModel::model('pipi_applications')->where('user_id', $user->id)->get();
foreach ($application as $app) {
$car = UniModel::model('pipi_auto')->find($app->car_id);
@ -167,6 +168,9 @@ class MobileApiController extends Controller
]
];
}
if (empty($applications)) {
$applications = (object) $applications;
}
return response()->json($applications);
}