1. Go to this page and download the library: Download kottergroup/firebase library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kottergroup / firebase example snippets
$firebase = new \Geckob\Firebase\Firebase('path_to_your_secret_file.json');
// Set the parent node.
$firebase = $firebase->setPath('bookings/');
// Create a new node with key = test and value = testValue.
// If the node already exist, it will update the value
$firebase->set('test','testValue');
// Support multiple nodes, if it doesnt exist, it will create the node
$firebase->set('testObject/testKey', 'testValueObject');
// Update properties of an object. This ode with key = test
$firebase->delete('test');
// Delete the multilevel node and all it's children
$firebase->delete('testObject/testKey');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.