HomeController.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Admin\Controllers;
  3. use App\Admin\Metrics\Examples;
  4. use App\Http\Controllers\Controller;
  5. use Dcat\Admin\Http\Controllers\Dashboard;
  6. use Dcat\Admin\Layout\Column;
  7. use Dcat\Admin\Layout\Content;
  8. use Dcat\Admin\Layout\Row;
  9. use Dcat\Admin\Widgets\Card;
  10. use Dcat\Admin\Widgets\Linkbox;
  11. use Dcat\Admin\Widgets\MediaList;
  12. use Dcat\Admin\Widgets\Callout;
  13. use Dcat\Admin\Widgets\Alert;
  14. use Dcat\Admin\Widgets\ListGroup;
  15. use Dcat\Admin\Widgets\InfoList;
  16. use Dcat\Admin\Widgets\CoverCard;
  17. class HomeController extends Controller
  18. {
  19. public function index(Content $content)
  20. {
  21. $content = $content
  22. ->view('admin.layouts.content')
  23. ->title(admin_trans('site_name'))
  24. ->header(admin_trans( 'admin.home'))
  25. ->description('')
  26. // ->row($alert->info())
  27. ->row(function (Row $row) {
  28. $row->column(12, function (Column $column) {
  29. $column->row(self::title());
  30. });
  31. });
  32. return $content;
  33. }
  34. public static function title()
  35. {
  36. return view('admin.dashboard.title');
  37. }
  38. }