cache = $cache; $this->url = $url ?: static::URL; } /** * Returns the latest credits. * * @return array */ public function latest() { return $this->cache->remember('version', 2880, function () { return json_decode((new Client())->get($this->url, [ 'headers' => ['Accept' => 'application/json'], ])->getBody(), true); }); } }