I have a JSON file that I would like to upload to a controller in Laravel so that I can use the data in my application.
The path to the files is / storage / app / calendar_Ids.json.
What is the right way to do this?
Here it should help you sort out.
use Storage; $json = Storage::disk('local')->get('calendar_Ids.json'); $json = json_decode($json, true);
try it
$path = '/storage/app/calendar_Ids.json'; $content = json_decode(file_get_contents($path), true);`
Then just dd($content);to see if it works.
dd($content);
You can also try:
$json = storage_path('folder/filename.json');
Source: https://habr.com/ru/post/1671720/More articles:Spring облако Zuul повторяет попытку, когда экземпляр отключен и переходит в другой доступный экземпляр - spring-cloudVS30063: you do not have access to https: // xxxxx-tfs - tfsadd footer to DT - cssMix the two arrays so that the corresponding columns are next to each other - Python - pythonDocker builds in cross-platform environment - dockerПочему geom_density и stat_density (geom = "line" ) дают разные результаты? - rC ++ 11 copy elison and exception (catch argument) - c ++LINQ to Entities, which throws an exception in .NET Core, "Value cannot be null", - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1671724/use-javascript-array-reduce-given-n-inputs-to-yield-m-outputs&usg=ALkJrhgQEVuZ_mqXTpBQdFZtlxDpEf3EGwMaven: a dependency appears in an effective pom, but not in a dependency tree - mavenAll Articles