title: How to Verify Email Without Asking the User to Login to Laravel
body: <p>I am developing a Laravel application. My application is using Laravel built-in auth feature. In the Laravel auth when a user registers, a verification email is sent. When a user verifies the email click on the link inside the email, the user has to login again to confirm the email if the user is not already logged in.</p>
  
  <p><strong>VerificationController</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>class VerificationController extends Controller
  {
      use VerifiesEmails, RedirectsUsersBasedOnRoles;
  
      /**
       * Create a new controller instance.
       * @return void
       */
      public function __construct()
      {
          $this-&gt;middleware('auth');
          $this-&gt;middleware('signed')-&gt;only('verify');
          $this-&gt;middleware('throttle:6,1')-&gt;only('verify', 'resend');
      }
  
      public function redirectPath()
      {
          return $this-&gt;getRedirectTo(Auth::guard()-&gt;user());
      }
  }
  </code></pre>
  
  <p>I tried commenting on this line.</p>
  
  <pre><code>$this-&gt;middleware('auth');
  </code></pre>
  
  <p>But it's s not working and instead, throwing an error. How can I enable Laravel to be able to verify email even if the user is not logged in?</p>