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