laravel @if or @isset show nothing or gives an exeption
I have made in laravel v.8. a database query (eloquent) that returns several columns. $wgName = Auth::user() ->join(‘wg_groups’, ‘users.wg_group_id’, ‘=’, ‘wg_groups.id’) ->get(); Now I want in my html view that the wg_name is displayed if it is set. I have tried the following four things: @if(isset($wgName->wg_name)) <h1>{{$wgName->wg_name}}</h1> @endif Here simply nothing is displayed @if(isset($wgName)) <h1>{{$wgName->wg_name}}</h1>… Read More laravel @if or @isset show nothing or gives an exeption