title: migration fails as route middleware selects from non-existing table during tests
body: <p>I can't run tests as migration fails as a route middleware queries from a table during (or even before the start of) migration that needs to be created while migrating.</p>
  
  <p>I've tried to run my test with <code>-&gt;withoutMiddleware()</code> or <code>-&gt;withoutMiddleware(ThatMiddleware::class)</code> with not much of a success.</p>
  
  <p>So my current workaround is as following. In the middleware in question I do this:</p>
  
  <pre class="lang-php prettyprint-override"><code>class ThatMiddleware extends ServiceProvider {
      public function boot() {
          if(Schema::hasTable('table_in_question')) {
              // ... code that queries the table
          }
      }
  }
  </code></pre>
  
  <p>But this seems a bit insecure especially considering the middleware is for authentication.
  I'm not sure this error is a result of a poorly written middleware or test.</p>
  
  <p>Is there any better way to fix this?</p>