PHP code example of geckob / firebase

1. Go to this page and download the library: Download geckob/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/ */

    

geckob / 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');


// Same as set but without keys. This