1
你好,我是一個laravel初學者,當我這樣做的foreach其顯示一倍所有單品我應該怎麼用它做代碼和SS都低於laravel 5.4表指導需要
代碼
<div >
<h1 style="text-align: center">Lists of Outlets</h1>
@foreach($outlets as $outlet)
<table class="table table-striped">
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Doe</td>
<td>[email protected]</td>
</tr>
</tbody>
</table>
@endforeach
</div>
看起來另外一個問題是,它實際上並沒有使用'$ outlet'中的任何內容,而是每一個都使用相同的靜態值。 –
@ Don'tPanic你是對的 –