Update Cache, prepare for laravel 5.8
This commit is contained in:
parent
6bbef6ac4e
commit
4739c25fe0
15 changed files with 31 additions and 30 deletions
|
@ -11,7 +11,7 @@ class InstanceApiController extends Controller {
|
|||
|
||||
protected function getData()
|
||||
{
|
||||
$contact = Cache::remember('api:v1:instance:contact', 1440, function() {
|
||||
$contact = Cache::remember('api:v1:instance:contact', now()->addMinutes(1440), function() {
|
||||
$admin = User::whereIsAdmin(true)->first()->profile;
|
||||
return [
|
||||
'id' => $admin->id,
|
||||
|
@ -56,7 +56,7 @@ class InstanceApiController extends Controller {
|
|||
|
||||
public function instance()
|
||||
{
|
||||
$res = Cache::remember('api:v1:instance', 60, function() {
|
||||
$res = Cache::remember('api:v1:instance', now()->addMinutes(60), function() {
|
||||
return json_encode($this->getData());
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue