title: PHP/Laravel Take json from string
body: <p>I call an API and the response is like this:</p>
  
  <pre><code>HTTP/1.1 201 Created 
  Date: Tue, 12 Jun 2018 13:13:34 GMT
  Server: Apache/2.4.x (Ubuntu)
  Set-Cookie: PHPSESSID=id; path=/; HttpOnly
  Expires: Thu, 19 Nov 1981 08:52:00 GMT
  Cache-Control: no-store, no-cache, must-revalidate
  Pragma: no-cache
  Content-Length: 114
  Connection: close
  Content-Type: application/json
  
  {"id":"id_code|id_code|id_code","error":{"code":0,"message":"message"}}
  </code></pre>
  
  <p>What I want to do is take only the json part from final:</p>
  
  <pre><code>{"id":"id_code|id_code|id_code","error":{"code":0,"message":"message"}}
  </code></pre>
  
  <p>Can I do this using PHP? </p>
  
  <p>Thank you!</p>