抄首页的逻辑即可。
找到:tipaskx/app/Http/Controllers/IndexController.php
/*热门话题*/
$hotTags = Taggable::globalHotTags();
设置输出变量:
return view('theme::home.index')->with(compact('hotTags','topCoinUsers','friendshipLinks'));
<div class="widget-box">
<h2 class="h4 widget-box-title">热议话题 <a href="{{ route('website.topic') }}" title="更多">»</a></h2>
<ul class="taglist-inline multi">
@foreach($hotTags as $hotTag)
<li class="tagPopup"><a class="tag" data-toggle="popover" href="{{ route('ask.tag.index',['id'=>$hotTag->tag_id]) }}" target="_blank">{{ $hotTag->name }}</a></li>
@endforeach
</ul>
</div>
如果觉得我的回答对您有用,请随意打赏。你的支持将鼓励我继续创作!