Skip to content
Advertisement

How to read json file from url in php/laravel?

I want to open a JSON from url in php/laravel file. this is my code :

JavaScript

when i try reload page i get this error :

something went wrong

how can i read JSON from url ?

Advertisement

Answer

Use cURL to get the json data. Like this

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement