title: Invalid argument supplied for foreach() when using json_decode
body: <p>When i do check dd($order-&gt;customer_id) result will come like this</p>
  <pre><code>     [&quot;2451&quot;,&quot;2453&quot;,&quot;2463&quot;,&quot;2457&quot;,&quot;2456&quot;,&quot;2470&quot;,&quot;2467&quot;,&quot;2468&quot;,&quot;2488&quot;,&quot;2472&quot;,&quot;2482&quot;,&quot;2469&quot;,&quot;2480&quot;]
  </code></pre>
  <p><a href="https://i.stack.imgur.com/x3xAk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x3xAk.png" alt="enter image description here" /></a></p>
  <p>i used foreach loop like this.</p>
  <pre><code>@foreach(json_decode($order-&gt;customer_id) as $key =&gt; $value)
    &lt;input name=&quot;customer_id[]&quot; value=&quot;{{ json_decode($order-&gt;customer_id)[$key] ?? null }}&quot;                                             
    class=&quot;form-control&quot;&gt;
   @endforeach
  </code></pre>
  <p>But error is coming Invalid argument supplied for foreach()</p>