Resource interpreted as Document but transferred with MIME type application/json laravel异常请求返回警告
一般情况下,laravel在方法里可以向前端返回数组格式 return [],
框架可以自动将数组转成JSON字符串返回,但浏览器会报MIME类型警告,
如是做APP接口可以忽视该警告;
但在前端ajax异步请求时最好把返回的数组手动转化成json字符串返回,
也是就json_encode([]),这样就不会出现Resource interpreted as Document but transferred with MIME type application/json警告