title: htmlspecialchars expects parameter 1 to be string, array given
body: <p>I am getting the next error while printing a model content on my blade.php view:</p>
  
  <pre><code>htmlspecialchars() expects parameter 1 to be string, array given
  </code></pre>
  
  <p>This model "content" is a column (json type) in a table and it looks just like this:</p>
  
  <pre><code>[{"Item":2}]
  </code></pre>
  
  <p>And this is how i'm trying to use it on my view:</p>
  
  <pre><code>@foreach ($post-&gt;loot-&gt;content as $name =&gt; $amount)
       &lt;div class="item"&gt;
            &lt;i class="fab fa-cuttlefish"&gt;&lt;/i&gt;
            &lt;div class="text"&gt;{{ $name }} &lt;b&gt;x{{ $amount }}&lt;/b&gt;&lt;/div&gt;
       &lt;/div&gt;
  @endforeach
  </code></pre>
  
  <p>For some reason, if i print $name alone, it shows the number (2) that should be printed while using the $amount variable.</p>
  
  <p>Is there any way to solve my problem?</p>