title: Error with trying to get non-object property in blade
body: <p>So I am trying to pass data to view:</p>
  <pre><code>$orders = $this
          -&gt;query()
          -&gt;where('user_id', '=', $id)
          -&gt;with(['payment', 'payment.paymentStatus'])
          -&gt;get();
  
  return view('profile.profile-orders', compact('orders'));
  </code></pre>
  <p>I get this payload:</p>
  <pre><code>{
    &quot;id&quot;: 4,
    &quot;order_id&quot;: 4,
    &quot;status&quot;: 1,
    &quot;price&quot;: 897,
    &quot;payment_date&quot;: &quot;2021-10-11 18:11:50&quot;,
    &quot;payment_status&quot;: {
      &quot;id&quot;: 1,
      &quot;title&quot;: &quot;Not paid&quot;,
      &quot;status_color&quot;: &quot;#d1dade&quot;,
    },
    &quot;order&quot;: {
      &quot;id&quot;: 4,
      &quot;customer_id&quot;: 4,
      &quot;created_at&quot;: &quot;2021-10-11T18:11:33.000000Z&quot;,
      &quot;updated_at&quot;: &quot;2021-10-11T18:11:33.000000Z&quot;,
      &quot;items&quot;: [
        {
          &quot;id&quot;: 5,
          &quot;amount&quot;: 1,
          &quot;price&quot;: 697,
          &quot;product&quot;: {
            &quot;id&quot;: 1,
            &quot;price&quot;: &quot;697.00&quot;,
            &quot;order&quot;: 1,
            &quot;images&quot;: [
              {
                &quot;img&quot;: &quot;image1&quot;
              },
              {
                &quot;img&quot;: &quot;image2&quot;
              }
            ],
          }
        }
      ]
    }
  }
  </code></pre>
  <p>And inside my view I try to get <code>payment_status-&gt;title</code></p>
  <pre><code>@foreach($orders as $order)
  &lt;tr&gt;
     &lt;td&gt;{{ $order-&gt;payment-&gt;payment_status-&gt;title }}&lt;/td&gt;
  &lt;/tr&gt;
  @endforeach
  </code></pre>
  <p>But I get this error <code>Trying to get property 'title' of non-object</code> How do I fix this this error?</p>