title: In Laravel 8, how to redirect to home in case on 500 error
body: <p>I'm using Laravel 8, in production my <code>.env</code> set to <code>APP_DEBUG=false</code> but I don't want show a 500 view, I need redirect to mysite.com/home if Laravel returns a 500 error.</p>
  <p>In Laravel docs (<a href="https://laravel.com/docs/8.x/errors" rel="nofollow noreferrer">https://laravel.com/docs/8.x/errors</a>) explain how to handle errors but i can't understand it, im new in Laravel 8.</p>
  <p>My app/Exceptions/Handler.php is:</p>
  <pre><code>&lt;?php
  
  namespace App\Exceptions;
  
  use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
  use Throwable;
  
  class Handler extends ExceptionHandler
  {
      /**
       * A list of the exception types that are not reported.
       *
       * @var array
       */
      protected $dontReport = [
          //
      ];
  
      /**
       * A list of the inputs that are never flashed for validation exceptions.
       *
       * @var array
       */
      protected $dontFlash = [
          'password',
          'password_confirmation',
      ];
  
      /**
       * Register the exception handling callbacks for the application.
       *
       * @return void
       */
      public function register()
      {
          $this-&gt;reportable(function (Throwable $e) {
              //
          });
      }
  }
  </code></pre>