我希望将我的$ favs对象的项目分组为每行4列
<div class="row row justify-content-center">
<div class="col-9">
<div class="row">
@foreach ($favs->items as $fav)
<ul class="col-sm-3 list-unstyled">
<li class="subcat-li"><a href="{{ route('web.custom_url',$fav->seo->slug ) }}">{{ $fav->name }}</a></li>
</ul>
@endforeach
</div>
</div>
</div>
答案 0 :(得分:0)
<div class="row">
@foreach($favs->items as $fav)
<div class="col-md-3">
<a href="{{ route('web.custom_url',$fav->seo->slug ) }}">{{ $fav->name }}</a>
</div>
@endforeach
</div>