請幫助我嘗試了最大的方法但沒有結果,我是 laravel 的初學者!!!每次都出現相同的錯誤(ErrorException Trying to get property 'nom_service' of non-object)
liste.blade.php
<td> {{$data->candidature->demande}} </td>
<td> {{$data->candidature->service->nom_service}} </td>
<td> {{$data->nom}} </td>
uj5u.com熱心網友回復:
如果 service 確實是評論中所說的陣列,請嘗試以下操作:
@foreach ($data->candidature->service as $service)
<td> {{$service->nom_service}} </td>
@endforeach
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/461959.html
上一篇:獨特的收藏Laravel
