my controller method returns this array, I know data is being returned
return view('bill')->with('itemarray',Menu::where('itemname','Apple Pie')->get());
my view is suppose to act on it like this but the print_r method prints the array but the td of the table has nothing in it and I am not getting an error
@if(isset($itemarray))
<table>
<tr>
<td>{{ $itemarray->pull('itemname') }} <!-- this prints nothing --> </td>
<td> {{ $itemarray->pull('itemprice') }} <!-- this prints nothing --> </td>
</tr>
</table>
<p> {{ print_r($itemarray) }} <!-- this prints ok --> </p>
@endif
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Enp0sj
via IFTTT
Aucun commentaire:
Enregistrer un commentaire