fetcher->get($endpoint); return $companiesMap; } public function saveMap($companies, $city = null) { foreach ($companies as $company) { $uuid = $company['id']; $name = $company['name']; $image = $company['image'] ?? ''; $description = $company['description'] ?? ''; Company::firstOrCreate([ 'uuid' => $uuid, 'name' => $name, 'image' => $image, 'description' => $description, ]); } } }