第35行的FatalErrorException:语法错误,意外')',期待'(''
</section>
<hr/>
<table class="table table-paper table-condensed table-bordered">
<thead>
<tr>
<th>#</th>
<th>@lang('viewproductlocations.Product Name')</th>
<th>Department Name</th>
<th>Quantity</th>
<th>Created At</th>
<th>@lang('viewproductlocations.Updated At')</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
@foreach ($productsInDepartments as $productsInDepartment)
<tr class="">
<th scope="row">{{$i}}</th>
@foreach ($productsInDepartment->present()->groupAndSumUpProductsInDepartments as departmentProduct)
<td>{{$departmentProduct->product->productName}}</td>
<td>{{$departmentProduct->totalAmount}}</td>
@endforeach
<td>
{{$productsInDepartment->name}}
</td>
<td>{{Carbon::parse($productsInDepartment->created_at)->format('d/m/Y')}} </td>
<td>{{Carbon::parse($productsInDepartment->updated_at)->format('d/m/Y')}} </td>
<?php $i++; ?>
</tr>
@endforeach
</tbody>
</table>
@endsection
我收到此错误请帮助我,我收到语法错误.FatalErrorException
答案 0 :(得分:0)
请发布fullCode并突出显示第35行。 但我认为你应该检查这部分
@foreach ($productsInDepartment->present()->groupAndSumUpProductsInDepartments as departmentProduct)
尝试添加 - &gt; get()
@foreach ($productsInDepartment->present()->groupAndSumUpProductsInDepartments->get() as departmentProduct)
答案 1 :(得分:0)
我能够解决我的问题。我不得不循环我得到的结果,这是一个列表,语法错误来自我留下的其他面孔