nim_style 3

pull/15/head
nimtaurel 2025-05-19 18:50:42 +05:00
parent 3000011817
commit e56e37a36a
1 changed files with 13 additions and 13 deletions

View File

@ -31,21 +31,21 @@ class Main extends Component
'ended_at' => Carbon::now()->addDays(3)->toDateString(), 'ended_at' => Carbon::now()->addDays(3)->toDateString(),
]); ]);
// $response = (new \App\Http\Controllers\MobileApiController)->getAvailableMarksList($request); $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', [ $this->params['cars'] = collect($response->getData(true))->filter(function ($item) {
'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']); return !empty($item['tariffs']);
})->values(); })->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();
} }
} }