<?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 ModStart\Widget\Chart\Line; 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(6, DashboardItemA::makeIconNumberTitle( 'iconfont icon-user', ModelUtil::count('member_user'), '会员总数', modstart_admin_url('member'), ColorUtil::randomColor() )); $row->column(6, DashboardItemA::makeIconNumberTitle( 'iconfont icon-details', ModelUtil::count('doc'), '文档数量', modstart_admin_url('doc'), ColorUtil::randomColor() )); }), '基本概况', 'transparent')->style('margin-bottom:0rem;')) ->append(new CopyrightWidget()); } }