Instead of if-statement to check logged in user, use @auth
directive.
Typical way:
1@if(auth()->user())2 // The user is authenticated.3@endif
Shorter:
1@auth2 // The user is authenticated.3@endauth
The opposite is @guest
directive:
1@guest2 // The user is not authenticated.3@endguest