title: Show a 404 page if route not found in Laravel 5.1
body: <p>I am trying to figure out to show 404 page not found if a route is not found. I followed many tutorials, but it doesn't work.
  I have <code>404.blade.php</code> in <code>\laravel\resources\views\errors</code></p>
  
  <p>Also in handler.php</p>
  
  <pre><code>public function render($request, Exception $e)
  {
      if ($e instanceof TokenMismatchException) {
          // redirect to form an example of how i handle mine
          return redirect($request-&gt;fullUrl())-&gt;with(
              'csrf_error',
              "Opps! Seems you couldn't submit form for a longtime. Please try again"
          );
      }
  
      /*if ($e instanceof CustomException) {
          return response()-&gt;view('errors.404', [], 500);
      }*/
  
      if ($e instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
          return response(view('error.404'), 404);
  
      return parent::render($request, $e);
  }
  </code></pre>
  
  <p>If I enter wrong URL in browser, it returns a blank page. I have </p>
  
  <pre><code>'debug' =&gt; env('APP_DEBUG', true),
  </code></pre>
  
  <p>in app.php.</p>
  
  <p>Can anyone help me  how to show a 404 page if route is not found? Thank you.</p>