title: JSONP with Laravel
body: <p>Browser sends JSONP requets to Laravel, Laravel returns the results to browser. In the brower console, I get the warning:</p>
  
  <pre><code>Resource interpreted as Script but transferred with MIME type text/html:
  </code></pre>
  
  <p>I believe this is due to improper headers in the JSONP response? How should this warning be fixed?</p>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>$callback = Input::get('callback');
  $result = DB::table('users')-&gt;find(123);
  
  return $callback . '(' . json_encode($result) . ')';
  </code></pre>
  
  <p><code>Response::JSON($result)</code> will return the usual JSON response I believe, not the JSONP variant with the callback function name wrapping around the payload.</p>