title: How to upgrade App\Exceptions from laravel 7 to laravel 8
body: <p>How to upgrade App\Exceptions; from laravel 7 to laravel 8</p>
  <pre><code>public function render($request, Throwable $exception)
      {
          if ($exception instanceof UnauthorizedException) {
              if (Auth::user() instanceof Admin) {
                  return redirect()-&gt;route('dashboard');
              }
              return redirect()-&gt;route('home');
          }
          return parent::render($request, $exception);
      }
  </code></pre>