TIP 08 / 20

Blade @Auth.

Instead of if-statement to check logged in user, use @auth directive.

Typical way:

blade
@if(auth()->user())
    // The user is authenticated.
@endif

Shorter:

blade
@auth
    // The user is authenticated.
@endauth

The opposite is @guest directive:

blade
@guest
    // The user is not authenticated.
@endguest