<?php
 namespace App\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Admin\Layout\AdminPage; use ModStart\Admin\Widget\DashboardItemA; use ModStart\Admin\Widget\SecurityTooltipBox; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Util\ColorUtil; use ModStart\Layout\Row; use ModStart\Widget\Box; use Module\AdminManager\Widget\CopyrightWidget; class IndexController extends Controller { public function index(AdminPage $page) { return $page->pageTitle(L('Dashboard')) ->row(new SecurityTooltipBox()) ->append(Box::make(new Row(function (Row $row) { $row->column(4, DashboardItemA::makeIconNumberTitle( 'iconfont icon-user', ModelUtil::count('member_user'), '会员总数', modstart_admin_url('member'), ColorUtil::randomColor() )); $row->column(4, DashboardItemA::makeIconNumberTitle( 'iconfont icon-desktop', ModelUtil::count('paper_exam'), '考试人次', modstart_admin_url('paper_exam'), ColorUtil::randomColor() )); $row->column(4, DashboardItemA::makeIconNumberTitle( 'iconfont icon-details', ModelUtil::count('question'), '题目总数', modstart_admin_url('question'), ColorUtil::randomColor() )); $row->column(6, DashboardItemA::makeIconNumberTitle( 'iconfont icon-details', ModelUtil::count('news'), '资讯总数', modstart_admin_url('news'), ColorUtil::randomColor() )); $row->column(6, DashboardItemA::makeIconNumberTitle( 'iconfont icon-details', ModelUtil::count('paper'), '试卷总数', modstart_admin_url('paper'), ColorUtil::randomColor() )); }), '基本概况', 'transparent')->style('margin-bottom:0rem;')) ->row(new CopyrightWidget()); } }