mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
Optimize code
This commit is contained in:
parent
33708a2cbd
commit
23ea221d50
1 changed files with 2 additions and 2 deletions
|
@ -82,12 +82,12 @@ class Application extends IlluminateApplication
|
|||
*/
|
||||
public function getLatestVersion(Client $client = null)
|
||||
{
|
||||
$client = $client ?: new Client();
|
||||
|
||||
if ($v = Cache::get('latestKoelVersion')) {
|
||||
return $v;
|
||||
}
|
||||
|
||||
$client = $client ?: new Client();
|
||||
|
||||
try {
|
||||
$v = json_decode($client->get('https://api.github.com/repos/phanan/koel/tags')->getBody())[0]->name;
|
||||
// Cache for one day
|
||||
|
|
Loading…
Reference in a new issue