Code
@if(Auth::user()->id_UsGr == 1) <li class="nav-item"> <a class="nav-link" href="/admin">Админка</a> </li> @endif Here @if (Auth :: user () -> id_UsGr == 1) checks if the logged-in user id_UsGr = 1 then displays the list.
On a razlogin, it gives an error "Trying to get the property of non-object" when checking the Auth :: user () for a match.
I do not understand what is wrong?