first
This commit is contained in:
46
app/Admin/Controllers/HomeController.php
Normal file
46
app/Admin/Controllers/HomeController.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Admin\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Encore\Admin\Layout\Column;
|
||||
use Encore\Admin\Layout\Content;
|
||||
use Encore\Admin\Layout\Row;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Notes : 数据看板
|
||||
*
|
||||
* @Date : 2021/3/10 5:12 下午
|
||||
* @Author : <Jason.C>
|
||||
* @param Content $content
|
||||
* @return Content
|
||||
*/
|
||||
public function index(Content $content): Content
|
||||
{
|
||||
if (config('app.debug')) {
|
||||
return $content
|
||||
->title(__('admin.menu_titles.dashboard'))
|
||||
->description('Description...')
|
||||
->row(Dashboard::title())
|
||||
->row(function (Row $row) {
|
||||
$row->column(4, function (Column $column) {
|
||||
$column->append(Dashboard::environment());
|
||||
});
|
||||
|
||||
$row->column(4, function (Column $column) {
|
||||
$column->append(Dashboard::dependencies());
|
||||
});
|
||||
|
||||
$row->column(4, function (Column $column) {
|
||||
$column->append(Dashboard::extensions());
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return $content
|
||||
->title(__('admin.menu_titles.dashboard'))
|
||||
->description('Description...');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user