title(trans('admin-home.Total_games')); } /** * 处理请求. * * @param Request $request * * @return void */ public function handle(Request $request) { $total_team = Game::query()->count(); $this->content($total_team); } /** * @param int $percent * * @return $this */ public function up($percent) { return $this->footer( " {$percent}% Increase" ); } /** * @param int $percent * * @return $this */ public function down($percent) { return $this->footer( " {$percent}% Decrease" ); } /** * 设置卡片底部内容. * * @param string|Renderable|\Closure $footer * * @return $this */ public function footer($footer) { $this->footer = $footer; return $this; } /** * 渲染卡片内容. * * @return string */ public function renderContent() { $content = parent::renderContent(); return <<

{$content}

HTML; } /** * 渲染卡片底部内容. * * @return string */ public function renderFooter() { return $this->toString($this->footer); } }