Curious if there’s a better way to authenticate users using Blade.
The traditional way to check if a user is logged in or not to display certain information goes like this:
<?php if ( is_user_logged_in() ) { ?>You're logged in. Log out.<?php } ?>
Some Blade documentation suggests:
@if (Auth::check())
//show logged in navbar
@else
//show logged out navbar
@endif
Or Blade 5.7+ suggests:
@auth
// The user is authenticated...
@endauth
@guest
// The user is not authenticated...
@endguest
Perhpas these methods aren’t configured with Sage to work with WordPress? Or are there other suggestions better than all I listed?