title: laravel 5.6 with guzzlehttp 6 trying to get property of a title of a non object
body: <p>i was trying to consume an external api. <a href="https://yts.am/api/v2/list_movies.json" rel="nofollow noreferrer">https://yts.am/api/v2/list_movies.json</a>,
  and below is my controller code.</p>
  
  <pre><code>public function listMovies()
      {
          $client = new Client([
          'base_uri' =&gt; 'https://yts.am/api/v2/',
          ]);
  
          $response = $client-&gt;request('GET', 'list_movies.json');
          //dd($response);
  
          $movies = json_decode($response-&gt;getBody()-&gt;getContents());
          return view('movies.index', compact('movies'));
      }
  </code></pre>
  
  <p>and this is my view file</p>
  
  <pre><code>&lt;div class="container"&gt;
          &lt;div class="row py-5"&gt;
              &lt;div class="col"&gt;
              @foreach($movies as $movie)
                  &lt;div class="card"&gt;
                      &lt;div class="card-header"&gt;
                          {{$movie-&gt;title }}
                      &lt;/div&gt;
                      &lt;div class="card-body"&gt;
                          {{ $movie-&gt;summary }}
                      &lt;/div&gt;
                  &lt;/div&gt;
              @endforeach
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>but iam getting this error: Trying to get property 'title' of non-object (View: </p>