mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update InstanceService
This commit is contained in:
parent
ad2db4aea7
commit
2fb916c22b
1 changed files with 12 additions and 0 deletions
|
@ -27,4 +27,16 @@ class InstanceService
|
|||
return Instance::whereAutoCw(true)->pluck('domain')->toArray();
|
||||
});
|
||||
}
|
||||
|
||||
public static function software($domain)
|
||||
{
|
||||
$key = 'instances:software:' . strtolower($domain);
|
||||
return Cache::remember($key, 86400, function() use($domain) {
|
||||
$instance = Instance::whereDomain($domain)->first();
|
||||
if(!$instance) {
|
||||
return;
|
||||
}
|
||||
return $instance->software;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue