Instead user @if and @endif statement to check logged in user, you can use @auth directive.
Usual way
@if(auth()->user())
// The user is authenticated.
@endif
using @auth
@auth
// The user is authenticated.
@endauth
Instead user @if and @endif statement to check logged in user, you can use @auth directive.
Usual way
@if(auth()->user())
// The user is authenticated.
@endif
using @auth
@auth
// The user is authenticated.
@endauth