title: Laravel - htmlspecialchars() expects parameter 1 to be string, object given
body: <p>I go this error: </p>
  
  <pre><code>htmlspecialchars() expects parameter 1 to be string, object given
  </code></pre>
  
  <p>I'm using in controller:</p>
  
  <pre><code>$data = '{"pr":{"code":"1"},"ac":[[{"icon":"web","action":"link","url":"asd"}]]}'
  $newData = json_decode($data);
  </code></pre>
  
  <p>And i send it to the view as array: 'data' => $newData
  And when i try to use $data into the view, it give me that error</p>
  
  <p>Tried already to use $data->ac OR $data['ac'] but still the same...
  Some help, please?</p>