title: How to remove an item from json stored in database using eloquent?
body: <p>I have a Model which stores data in the as follows:</p>
  <pre><code>{
              &quot;id&quot;: &quot;1f280536-3aa2-45d9-8f23-41c27a26c8bf&quot;,
              &quot;setting&quot;: {
                  &quot;item 1&quot;: &quot;first item&quot;,
                  &quot;item 2&quot;: &quot;second item&quot;,
                  &quot;logo&quot;: {
                      &quot;small&quot;: &quot;1anFsLsviRf_8zI5u8x5BY3OSf-jWAWkE&quot;
                  }
              },
  }
  </code></pre>
  <p>As you can see <code>setting</code> is a json which contains another nested json <code>logo</code>. I have a destroy controller method for removing a single logo from the <code>logo</code> json but when I try to mutate <code>logo</code> I got <code>ErrorException: Indirect modification of overloaded property App\Models\Company::$setting has no effect in file </code> error. I had the same error when storing new logo but I solved it using <code>array_merge</code></p>
  <pre><code> $company-&gt;setting = array_merge($company-&gt;setting, array(&quot;logo&quot;=&gt;array_merge($company-&gt;setting[&quot;logo&quot;], array($request-&gt;size=&gt;$file_id))));
  </code></pre>
  <p>How can I resolve my issue when removing single key value pair form <code>logo</code> json?</p>