title: Laravel ModelNotFoundException: No query results for model []
body: <p>I get this error when running my test:</p>
  
  <blockquote>
    <p>ModelNotFoundException: No query results for model [App\Content]</p>
  </blockquote>
  
  <p>Here is my test:</p>
  
  <pre><code>/** @test */
  public function it_loads_homepage()
  {
      $this-&gt;withoutExceptionHandling();
      $response = $this-&gt;get('/');
  
      $response-&gt;assertStatus(200);
  }
  </code></pre>
  
  <p>Here is my Controller:</p>
  
  <pre><code>public function home()
  {
      $topbar = Content::where('slug', 'topbar')-&gt;firstOrFail();
  
      return view('welcome')-&gt;with([
          'logo' =&gt; Arr::get($topbar-&gt;content, 'logo', asset('images/logo.png')),
          'quote' =&gt; Arr::get($topbar-&gt;content, 'quote'),
          'quote_author' =&gt; Arr::get($topbar-&gt;content, 'quote_author')
      ]);
  }
  </code></pre>
  
  <p>Here is my routes file:</p>
  
  <pre><code>Route::get('/', 'PageController@home');
  
  Route::post('/admin/content', 'ContentsController@store');
  
  Auth::routes();
  
  Route::get('/home', 'HomeController@index')-&gt;name('home');
  
  Route::middleware('auth')-&gt;prefix('admin')-&gt;group(function () {
      Route::get('/dashboard', 'DashboardsController@index');
      Route::patch('/contents/{content}', 'ContentsController@update');
  });
  </code></pre>
  
  <p>If anyone has any idea on how to help that would be much appreciated, thank you!</p>
  
  <p>P.S. If I need to include anything else please let me know Thank you!</p>