Answers for "access json file in laravel controller"

PHP
2

laravel read json file from storage

$path = storage_path() . "/json/${filename}.json"; // ie: /var/www/laravel/app/storage/json/filename.json

$json = json_decode(file_get_contents($path), true);
Posted by: Guest on October-29-2020
0

laravel open json file in storage

$path = storage_path() . "/json/${filename}.json"; // ie: /var/www/laravel/app/storage/json/filename.json
$json = json_decode(file_get_contents($path), true);
Posted by: Guest on October-01-2020

Code answers related to "access json file in laravel controller"

Browse Popular Code Answers by Language