title: Echo out from a Laravel 8 Eloquent collection
body: <p>I have this collection</p>
  <p><a href="https://i.stack.imgur.com/44cxz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/44cxz.png" alt="I have this collection:" /></a></p>
  <p><a href="https://i.stack.imgur.com/Apb1H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Apb1H.png" alt="enter image description here" /></a></p>
  <p>How can I echo the relations in Blade? I try this code:</p>
  <pre><code>@forelse($articles as $article)
                      &lt;tr&gt;
                          &lt;td&gt;{{ $article-&gt;title }}&lt;/td&gt;
                          &lt;td&gt;{{ $article-&gt;excerpt }}&lt;/td&gt;
                          &lt;td&gt;{{ $article-&gt;body }}&lt;/td&gt;
                          &lt;td&gt;{{ $article-&gt;colors-&gt;name }}&lt;/td&gt;
  </code></pre>
  <p>...
  But I get: &quot;Trying to get property 'name' of non-object (View: C:\xampp\htdocs\laravel\resources\views\articles\index.blade.php)&quot;</p>