title: Laravel 7 Illegal offset type
body: <p>I am having an error when I try to when updating multiple names of filters.</p>
  <pre><code>public function update(Request $request, Filter $filter)
  {
      $filters = collect([$request-&gt;filters]);
      $filters-&gt;each(function ($item) use ($request, $filter) {
          if (!isset($item['name']) &amp;&amp; !isset($item['latin'])) {
              foreach ($item as $key) {
                  $data = [
                      'category_id' =&gt; $request-&gt;category_id,
                      'name' =&gt; $item[$key]['name'],
                      'latin' =&gt; $item[$key]['latin'],
                      'field' =&gt; $item[$key]['field'],
                  ];
                  $filter-&gt;update($data);
              }
          } else {
              return ;
          }
      }
  }
  </code></pre>
  <p>When I change this, the first record is updated.</p>
  <pre><code>'name' =&gt; $item[1]['name'],
  'latin' =&gt; $item[1]['latin'],
  'field' =&gt; $item[1]['field'],
  </code></pre>
  <p>I now had three records and I changed all three folds and hit the reserve. The first record changed, the second and the third did not change. I want it to be n.</p>
  <p>When I try this</p>
  <pre><code>$filters-&gt;each(function ($item) use ($request, $filter) {
      if (!isset($item['field'])) {
          dd($item);
      }
  </code></pre>
  <p>I see this message</p>
  <pre><code>array:2 [▼
    5 =&gt; array:4 [▼
      &quot;name&quot; =&gt; &quot;Value RAM&quot;
      &quot;latin&quot; =&gt; &quot;ram&quot;
      &quot;field&quot; =&gt; &quot;0&quot;
      &quot;value&quot; =&gt; array:2 [▼
        0 =&gt; &quot;One Gigabayte&quot;
        1 =&gt; &quot;Twoo Gigabayte&quot;
      ]
    ]
    6 =&gt; array:3 [▼
      &quot;name&quot; =&gt; &quot;Color&quot;
      &quot;latin&quot; =&gt; &quot;color&quot;
      &quot;field&quot; =&gt; &quot;1&quot;
    ]
  ]
  </code></pre>