query())); return $this->cache->remember( "itunes.track.$hash", now()->addWeek(), function () use ($request): ?string { $response = $this->connector->send($request)->object(); if (!$response->resultCount) { return null; } $trackUrl = $response->results[0]->trackViewUrl; $connector = parse_url($trackUrl, PHP_URL_QUERY) ? '&' : '?'; return $trackUrl . "{$connector}at=" . config('koel.itunes.affiliate_id'); } ); }); } }