title: how do I create custom error page in laravel 5
body: <p>I want to show custom error page in my Laravel 5 app; for example any user type URL like <code>http://www.example.com/url123</code> (wrong) but <code>http://www.example.com/url</code> (right).</p>
  
  <p>Default error show as : </p>
  
  <blockquote>
    <p>Uh-oh, something went wrong! Error Code: 500</p>
  </blockquote>
  
  <p>But instead I want to show my custom view</p>
  
  <p>How I can achieve that as illustrated in the pages referenced below:</p>
  
  <p><a href="https://mattstauffer.co/blog/laravel-5.0-custom-error-pages#how-to" rel="nofollow noreferrer">https://mattstauffer.co/blog/laravel-5.0-custom-error-pages#how-to</a></p>
  
  <p><a href="https://laracasts.com/discuss/channels/general-discussion/how-do-i-create-a-custom-404-error-page" rel="nofollow noreferrer">https://laracasts.com/discuss/channels/general-discussion/how-do-i-create-a-custom-404-error-page</a></p>
  
  <p>My current <code>app/Exceptions/Handler.php</code>:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Exceptions;
  
  use Exception;
  use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
  use symfony\http-kernel\Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
  
  class Handler extends ExceptionHandler {
  
      protected $dontReport = [
          'Symfony\Component\HttpKernel\Exception\HttpException'
      ];
  
      public function report(Exception $e)
      {
          return parent::report($e);
      }
      public function render($request, Exception $e)
      {
          if ($this-&gt;isHttpException($e))
          {
              return $this-&gt;renderHttpException($e);
          }
          else if($e instanceof NotFoundHttpException)
          {
              return response()-&gt;view('missing', [], 404);
          }
          else
          {
              return parent::render($request, $e);
          }
      }
  
  }
  </code></pre>
  
  <p>And I've create a error view at <code>\resources\views\errors\404.blade.php</code> but <code>404.blade.php</code> still does not get loaded.</p>