1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-03 07:26:49 +08:00
2020-08-21 20:55:50 +08:00

48 lines
805 B
PHP

<?php
namespace App\Http\Admin\Services;
use App\Caches\SiteStat;
use App\Library\AppInfo;
use App\Library\Utils\ServerInfo;
class Index extends Service
{
public function getTopMenus()
{
$authMenu = new AuthMenu();
return $authMenu->getTopMenus();
}
public function getLeftMenus()
{
$authMenu = new AuthMenu();
return $authMenu->getLeftMenus();
}
public function getAppInfo()
{
return new AppInfo();
}
public function getServerInfo()
{
return [
'cpu' => ServerInfo::cpu(),
'memory' => ServerInfo::memory(),
'disk' => ServerInfo::disk(),
];
}
public function getStatInfo()
{
$cache = new SiteStat();
return $cache->get();
}
}