如果有文章,我想只显示标签。有什么建议我怎么办?
$tags = ATags::with('articles')->whereHas('language',function($query) use($current_language_id) {
$query->where('id','=',$current_language_id)->
})->limit(8)
->get()
->sortByDesc(function($tag) {
return $tag->articles->count();
});