title: Laravel 8 Register user while logged in
body: <p>I have two tables with users, one for public users and one for workers. The workers can only be created by other workers, but when I go to the workers registration url, it detects that I am logged in and redirects me to home, how can I change this behavior?</p>
  <p>I have tried commenting out part of the handle function in the RedirectIfAuthenticated.php file but this causes users to be able to visit the login links while logged in.</p>
  <p>Function I commented in RedirectIfAuthenticated.php:</p>
  <pre><code>public function handle(Request $request, Closure $next, ...$guards)
  {
      $guards = empty($guards) ? [null] : $guards;
  
      // foreach ($guards as $guard) {
      //     if (Auth::guard($guard)-&gt;check()) {
      //         return redirect(RouteServiceProvider::HOME);
      //     }
      // }
  
      return $next($request);
  }
  </code></pre>