title: Laravel Blade Display Only if Not Logged In
body: <p>I 'm using Laravel's middleware, and I'm trying to have an empty div if the user is not authenticated. Otherwise, I am trying to have a div that allows the user to create an account. I have tried the following:</p>
  
  <pre class="lang-php prettyprint-override"><code>@auth
      &lt;div class="form-group col-md-6"&gt;&lt;/div&gt;
  @else
      &lt;div class="form-group col-md-6"&gt;
          &lt;h6&gt;Create Account&lt;/h6&gt;
      &lt;/div&gt;
  @endauth
  </code></pre>
  
  <p><strong>Routes</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>Route::get('/checkout', 'CheckoutController@index')-&gt;name('checkout.index')-&gt;middleware('auth');
  Route::get('/guestCheckout', 'CheckoutController@index')-&gt;name('guestCheckout.index');
  </code></pre>
  
  <p><strong>CheckoutController.php</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>if (auth()-&gt;user() &amp;&amp; request()-&gt;is('guestCheckout')) {
      return redirect()-&gt;route('checkout.index');
  }
  </code></pre>
  
  <p>The above does not work, and I have tried deleting the history, clearing caches, etc. but to no avail. Suggestions? Thank you!</p>