链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
650 B

  1. <?php
  2. namespace App\Admin\Metrics\Examples\ServiceCard;
  3. use App\Models\LanzuMpInfo;
  4. use Dcat\Admin\Widgets\Metrics\Card;
  5. class TotalMp extends Card
  6. {
  7. protected function init()
  8. {
  9. parent::init();
  10. $this->title = '服务商量数';
  11. $this->content(LanzuMpInfo::count());
  12. }
  13. /**
  14. * 渲染卡片内容
  15. * @return string
  16. */
  17. public function renderContent()
  18. {
  19. $content = parent::renderContent();
  20. return <<<HTML
  21. <div class="d-flex justify-content-between align-items-center mt-1" style="margin-bottom: 2px">
  22. <h2 class="ml-1 font-large-1">{$content}</h2>
  23. </div>
  24. HTML;
  25. }
  26. }