链街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.

34 lines
649 B

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