Index.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 海豚PHP框架 [ DolphinPHP ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2016~2017 河源市卓锐科技有限公司 [ http://www.zrthink.com ]
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://dolphinphp.com
  8. // +----------------------------------------------------------------------
  9. // | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 )
  10. // +----------------------------------------------------------------------
  11. namespace app\cms\admin;
  12. use app\admin\controller\Admin;
  13. use think\Db;
  14. /**
  15. * 仪表盘控制器
  16. * @package app\cms\admin
  17. */
  18. class Index extends Admin
  19. {
  20. /**
  21. * 首页
  22. * @author 蔡伟明 <314013107@qq.com>
  23. * @return mixed
  24. */
  25. public function index()
  26. {
  27. $this->assign('document', Db::name('cms_document')->where('trash', 0)->count());
  28. $this->assign('column', Db::name('cms_column')->count());
  29. $this->assign('page', Db::name('cms_page')->count());
  30. $this->assign('model', Db::name('cms_model')->count());
  31. $this->assign('page_title', '仪表盘');
  32. return $this->fetch(); // 渲染模板
  33. }
  34. }