I'm trying to get data from a MySQL
database into a blade file using eloquent buI'mim getting the following error:
Property [tournament_wins] does not exist on this collection instance. (View: C:\xamps\htdocs\lara_crud\resources\views\profile.blade.php
Heres the code from the controller :
public function profile(){
$statistics = UserStats::all();
// return view('home')->with('user',$user);
return view('profile')->with('statistics',$statistics);
}
Heres a snippet of the code in the blade file :
<div class = "col-md-8">
<div class = "col-md-8">
<ul class = "list-group" id = "listGroup">
<h1 class ="text-center"><span class="badge badge-pill badge-default">Your Profile Details</span>
<br>
<br>
<li class ="list-group-item text-center well wow zoomIn" id = "myList"><h2><span class="badge badge-pill badge-success"></span>{{$statistics->tournament_wins}}</h2><span></li>
</ul>
</div>
</div>