title: Undefined variable: errors in Laravel
body: <p>When I want to register a user in my laravel project, the page always says </p>
  
  <blockquote>
    <p>Undefined variable: errors (View: /var/www/resources/views/auth/register.blade.php)"</p>
  </blockquote>
  
  <p>According to the Laravel documentation, <code>$errors</code> should always automatically be set:</p>
  
  <blockquote>
    <p>So, it is important to note that an $errors variable will always be available in all of your views on every request, allowing you to conveniently assume the $errors variable is always defined and can be safely used.</p>
  </blockquote>
  
  <p>I have this on on every view when I use:</p>
  
  <pre><code>@if (count($errors) &gt; 0)
      &lt;div class="alert alert-danger"&gt;
          &lt;ul&gt;
              @foreach ($errors-&gt;all() as $error)
                  &lt;li&gt;{{ $error }}&lt;/li&gt;
              @endforeach
          &lt;/ul&gt;
      &lt;/div&gt;
  @endif
  </code></pre>
  
  <p>or any other way when I want to use the <code>$errors</code> variable.</p>
  
  <p>Why is this? I never had this problem before.</p>
  
  <p>Can someone help me please?</p>