I am using Laravel-5right now and I just created a file JSONcalled test (test.json). My question is:
- Where should I put my JSON file?
- How can I use file_get_contents and point to the file that I need?
Here is what I tried, which is clearly wrong:
$string = file_get_contents("../json/test.json");
$json_file = json_decode($string, true);
Thank you so much for your help!
source
share