求大神指教调用问答的前10个分类,后面再调用所打开的分类临近的10个,总共调用20个分类
@foreach( $categories as $category )
<li @if( $category->id == $currentCategoryId ) class="active" @endif ><a href="{{ route('website.ask',['category_slug'=>$category->slug]) }}">{{ $category->name }}</a></li>
@endforeach
</ul>
举例:打开目标页,http://coin-ask.com:81/questions/Waves,让结果保留方框内的分类。
望大神指点,不胜感激