6
0
Fork 0
jiqu-library-server/app/Admin/Metrics/Store/TotalStore.php

32 lines
596 B
PHP

<?php
namespace App\Admin\Metrics\Store;
use Dcat\Admin\Widgets\Metrics\Card;
use App\Models\Store\Store;
class TotalStore extends Card
{
protected function init()
{
parent::init();
$this->title('店铺');
$this->subTitle('店铺总数');
$this->withContent(Store::effective()->count());
}
public function withContent($content)
{
return $this->content(
<<<HTML
<div class="card-body">
<h1 class="text-left">{$content}<h1>
</div>
HTML
);
}
}