28 lines
678 B
PHP
28 lines
678 B
PHP
<?php
|
|
namespace app\cms\admin;
|
|
|
|
use app\admin\controller\Admin;
|
|
use think\Db;
|
|
|
|
/**
|
|
* 仪表盘控制器
|
|
* @package app\cms\admin
|
|
*/
|
|
class Index extends Admin
|
|
{
|
|
/**
|
|
* 首页
|
|
* @author 蔡伟明 <314013107@qq.com>
|
|
* @return mixed
|
|
*/
|
|
public function index()
|
|
{
|
|
$this->assign('document', Db::name('cms_document')->where('trash', 0)->count());
|
|
$this->assign('column', Db::name('cms_column')->count());
|
|
$this->assign('page', Db::name('cms_page')->count());
|
|
$this->assign('model', Db::name('cms_model')->count());
|
|
$this->assign('page_title', '仪表盘');
|
|
return $this->fetch(); // 渲染模板
|
|
}
|
|
}
|