hi,
I want to import a excel file.
So in controller i do :
$reader=Excel::load('storage/app/uploads/Catalogue.xlsx', function($reader) {
});
// Getting all results
$results = $reader->get();
// reader methods
return view('catalogue', compact('results'));
And in blade.php :
@foreach ($results as $result)
<tr>
<td>{{$result}}</td>
</tr>
@endforeach
But the result is a collection :
{"chateau":"ANGELUS","appellation":"Saint Emilion","class":"1GCCB","mil":1981,"cl":75,"cond":"Unit.","qte":1,"regie":"Acquit","prix_unit_ht":"160,00 \u20ac"}
So, how to access to the value ?
Ex : "ANGELUS","Saint Emilion","1GCCB",1981,75,"Unit.",1,"Acquit","160,00 \u20ac"
Thanks
@foreach ($results as $rows)
<tr><td>
@foreach ($rows as $cell)
{{$cell}}
@endforeach</td>
</tr>
@endforeach
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community