nim_style 11

nim_style
nimtaurel 2025-05-20 16:46:10 +05:00
parent 1355e4c971
commit 59c0fdce3d
1 changed files with 15 additions and 15 deletions

View File

@ -26,28 +26,28 @@ class Main extends Component
$ended_at = Request::input('ended_at') ?? null;
$bodywork_filters = Request::input('bodywork_filters') ?? null;
// $request = new \Illuminate\Http\Request([
// 'started_at' => $started_at ?? Carbon::now()->toDateString(),
// 'ended_at' => $ended_at ?? Carbon::now()->addDays(3)->toDateString(),
// 'class' => $class_filters ?? null,
// 'bodywork' => $bodywork_filters ?? null,
// ]);
//
// $response = (new \App\Http\Controllers\MobileApiController)->getAvailableMarksList($request);
//
// $this->params['cars'] = collect($response->getData(true))->filter(function ($item) {
// return !empty($item['tariffs']);
// })->values();
$response = Http::get('https://cvm10.a7.kz/api/mobile/getAvailableMarksList', [
$request = new \Illuminate\Http\Request([
'started_at' => $started_at ?? Carbon::now()->toDateString(),
'ended_at' => $ended_at ?? Carbon::now()->addDays(3)->toDateString(),
'class' => $class_filters ?? null,
'bodywork' => $bodywork_filters ?? null,
]);
$this->params['cars'] = collect($response->json())->filter(function ($item) {
$response = (new \App\Http\Controllers\MobileApiController)->getAvailableMarksList($request);
$this->params['cars'] = collect($response->getData(true))->filter(function ($item) {
return !empty($item['tariffs']);
})->values();
// $response = Http::get('https://cvm10.a7.kz/api/mobile/getAvailableMarksList', [
// 'started_at' => $started_at ?? Carbon::now()->toDateString(),
// 'ended_at' => $ended_at ?? Carbon::now()->addDays(3)->toDateString(),
// 'class' => $class_filters ?? null,
// 'bodywork' => $bodywork_filters ?? null,
// ]);
//
// $this->params['cars'] = collect($response->json())->filter(function ($item) {
// return !empty($item['tariffs']);
// })->values();
}
}