i need to append some elements to json file
this is my code:
routes.php (stage1)
$array = ['id' => '1', 'number' => '123123', 'name' => 'ahmed'];
$json_array = json_encode($array);
Storage::append('test.json', json_encode(['user_name' => 'ahmedsk']));
test.json
{"user_name":"ahmedsk"}
{"id":"1","number":"24142","username":"ahmedsk"}
but when i make print_r() for $result it's not feedback
routes.php (stage2)
$result = Storage::get('test.json');
print_r($result);
With knowing i don't need to use the method of get all data from JSON file and edited it and resave it in file.
Thanks