I am trying to return a specific value in my Laravel view. I define a variable in my controller and pass it on to my view. This is what I get when my blade code looks like this:
<h1>{{ $sport }}</h1>

However, since this is returned in my view and I only want to have the "sport" itself I did this:
<h1>{{ $sport->sport }}</h1>
Undefined property: Illuminate\Database\Eloquent\Collection::$sport
Any help would be much appreciated.
Thanks
$sportvalue = $sport->sport;in your controller and then<h1>{{ $sportvalue }}</h1>in your view ?