【发布时间】:2018-05-13 17:01:59
【问题描述】:
我有以下收藏:
截图: 我想做的是使用刀片模板将每个州立大学按州分 3 行返回。例如:
马萨诸塞州
学院 1 学院 2 学院 3
佛罗里达
学院 1 学院 2 学院 3
大学 4
...
我尝试了其他帖子中的许多不同建议示例,但未能找到解决方案。
这是我尝试过的:
Here is what I have tried:
@foreach ($colleges as $college)
@foreach($college as $state)
<h1 style="center">{{ $state[0]['College']['state'] }}</h1>
<ul class="nospace clear">
<li class="one_quarter first">
<a href="#">
<img src="{{ asset('storage/' . $state[0]['College']['logo']) }}" alt="{{ $state[0]['College']['college'] }}" />
</a>
<h3 class="center">{{ $state[0]['College']['college'] }}</h3>
</li>
</ul>
@endforeach
@endforeach
任何帮助将不胜感激。
格雷格
【问题讨论】:
-
您决定让其他人为您编写代码,而不是展示您实际尝试过的内容。您可能应该聘请开发人员。
标签: php laravel-5 foreach laravel-blade