mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-09-03 06:31:37 +08:00
引入easyadmin'
This commit is contained in:
31
app/admin/service/ConfigService.php
Normal file
31
app/admin/service/ConfigService.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | EasyAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | PHP交流群: 763822524
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 https://mit-license.org
|
||||
// +----------------------------------------------------------------------
|
||||
// | github开源项目:https://github.com/zhongshaofa/EasyAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\service;
|
||||
|
||||
use think\facade\Cache;
|
||||
|
||||
class ConfigService
|
||||
{
|
||||
|
||||
public static function getVersion()
|
||||
{
|
||||
$version = Cache('version');
|
||||
if (empty($version)) {
|
||||
$version = sysconfig('site', 'site_version');
|
||||
cache('site_version', $version);
|
||||
Cache::set('version', $version, 3600);
|
||||
}
|
||||
return $version;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user