Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Laravel和foreach创建引导列_Laravel_Twitter Bootstrap_Laravel 5_Bootstrap 4 - Fatal编程技术网

使用Laravel和foreach创建引导列

使用Laravel和foreach创建引导列,laravel,twitter-bootstrap,laravel-5,bootstrap-4,Laravel,Twitter Bootstrap,Laravel 5,Bootstrap 4,我希望我的$favs对象的项目在每行的4列中分组 <div class="row row justify-content-center"> <div class="col-9"> <div class="row"> @foreach ($favs->items as $fav)

我希望我的$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>

@foreach($fav->items as$fav)
@endforeach
我希望它看起来像这样:


@foreach($fav->items as$fav)
@endforeach
是否已选中Chunk():
   <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>