我有一个项目列表,我想用以下方式呈现:
@foreach($campaignList as $campaign)
<div class="col-md-{{12/$columns}}">
@include('admin.includes.campaign_card',['campaign'=>$campaign,'link'=>true])
</div>
@endforeach
admin.includes.campaign_card
模板(debug)
@extends('admin.includes.base_campaign_card')
{{$campaign}} // Here the data is okay
@section('options')
{{$campaign}} //Here however I get the first item on each loop
@endsection
基本上,循环中部分中的campaign
对象保持不变。
答案 0 :(得分:0)