1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-22 03:32:47 +08:00
course-tencent-cloud/app/Caches/NavTreeList.php
2020-08-27 20:11:28 +08:00

34 lines
607 B
PHP

<?php
namespace App\Caches;
use App\Builders\NavTreeList as NavTreeListBuilder;
use App\Models\Nav as NavModel;
class NavTreeList extends Cache
{
protected $lifetime = 365 * 86400;
public function getLifetime()
{
return $this->lifetime;
}
public function getKey($id = null)
{
return 'nav_tree_list';
}
public function getContent($id = null)
{
$builder = new NavTreeListBuilder();
return [
'top' => $builder->handle(NavModel::POS_TOP),
'bottom' => $builder->handle(NavModel::POS_BOTTOM),
];
}
}