Skip to main content

akaunting/akaunting

9334 stars
1 code files
View akaunting/akaunting on GitHub

app/Traits/Modules.php

Open in GitHub
use Cache;
use Date;
 
trait Modules
{
//
public function getModules($data = [])
{
$key = 'apps.app.' . $this->getDataKeyOfModules($data);
 
$items = Cache::get($key);
 
if (!empty($items)) {
return $items;
}
 
$items = static::getResponseData('GET', 'apps/items');
 
Cache::put($key, $items, Date::now()->addHour());
 
return $items;
}
//
}