Level 50
have a read, may be you find something useful, similar issue here: https://laracasts.com/discuss/channels/laravel/laravel-return-texthtml-instead-of-applicationjson?page=1
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hi gaes,
why my code like this
return response()->json(['some data...']);
doesnt work in my hosting, but if try in localhost it work fine. in hosting content-type : text/html in localhost content-type: application/json
please, help me
Please or to participate in this conversation.