49 lines
1.7 KiB
PHP
49 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Admin\Controllers;
|
|
|
|
use App\Admin\Metrics\Examples;
|
|
use App\Http\Controllers\Controller;
|
|
use Dcat\Admin\Http\Controllers\Dashboard;
|
|
use Dcat\Admin\Layout\Column;
|
|
use Dcat\Admin\Layout\Content;
|
|
use Dcat\Admin\Layout\Row;
|
|
|
|
class HomeController extends Controller
|
|
{
|
|
public function index(Content $content)
|
|
{
|
|
return $content
|
|
->header('管理中心')
|
|
// ->description('后台管理中心')
|
|
->body(function (Row $row) {
|
|
$row->column(12, function (Column $column) {
|
|
$date = date('Y-m-d');
|
|
$column->row(
|
|
<<<HTML
|
|
<div class="dashboard-title card bg-primary">
|
|
<div class="card-body">
|
|
<div class="text-center mb-1">
|
|
<h1 class="mb-3 mt-2 text-white">{$date}</h1>
|
|
<h1 class="mb-3 mt-2 text-white">欢迎使用后台管理中心</h1>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
HTML
|
|
);
|
|
// $column->row(new Examples\Tickets());
|
|
});
|
|
|
|
// $row->column(6, function (Column $column) {
|
|
// $column->row(function (Row $row) {
|
|
// $row->column(6, new Examples\NewUsers());
|
|
// $row->column(6, new Examples\NewDevices());
|
|
// });
|
|
//
|
|
// $column->row(new Examples\Sessions());
|
|
// $column->row(new Examples\ProductOrders());
|
|
// });
|
|
});
|
|
}
|
|
}
|