In Firebase Realtime Database, you can update a single node using the Firebase Realtime Database REST API. Here is an example in PHP using the Guzzle HTTP Client:
First, install the Guzzle HTTP Client:
composer require guzzlehttp/guzzle
Next, you can use the following code to update a single node:
use GuzzleHttp\Client;
$client = new Client();
$node = [
'value' => 'new value',
];
$client->request('PATCH', 'https://<DATABASE_NAME>.firebaseio.com/<NODE_NAME>.json', [
'json' => $node,
]);
Note: Replace <DATABASE_NAME>
and <NODE_NAME>
with your Firebase Realtime Database name and node name respectively.