<?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-book', ModelUtil::count('blog'), '博客总数', modstart_admin_url('blog'), ColorUtil::randomColor() )); $row->column(4, DashboardItemA::makeIconNumberTitle( 'iconfont icon-pinglun', ModelUtil::count('blog_comment'), '博客评论', modstart_admin_url('blog_comment'), ColorUtil::randomColor() )); $row->column(4, DashboardItemA::makeIconNumberTitle( 'iconfont icon-pinglun', ModelUtil::count('message'), '留言总数', modstart_admin_url('message'), ColorUtil::randomColor() )); }), '基本概况', 'transparent')->style('margin-bottom:0rem;')) ->row(new CopyrightWidget()); } }