laravel return json file as string code example
Example 1: 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);
Example 2: php laravel return json response
return response()->json([
'name' => 'Abigail',
'state' => 'CA'
]);