Skip to content

CodeWithSushil/Firebase-PHP-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firebase-Client

Firebase Client for PHP. Create your PHP project with firebase's Realtime Database.

Example

<?php

require "vendor/autoload.php";
use Firebase\Firebase;

$url = "your firebase url";

$client = new Firebase($url);

// Read data
$client->retrieve("users");

// Post data
$data = ['name' => 'John doe', 'age' => 28];
$client->insert("users", $data);

// Update data
$data = ['name' => 'Natasha', 'age' => 21];
$client->insert("users", $data, $id);

// Delete data
$client->update("users", $id);