biottico/firebase

Connect to firebase

dev-master 2020-04-06 14:58 UTC

This package is auto-updated.

Last update: 2022-05-06 20:20:54 UTC


README

Ejemplo:

require_once '../vendor/autoload.php';

$config = [ 'biottico-firebase' => [ 'logFile' => "/var/log/xxxx.log", 'keyFile' => 'KEY_FILE.json', 'storageBuketName' => 'XXXXXXXXXX.appspot.com', 'storageUrlImage' => 'https://firebasestorage.googleapis.com/v0/b/XXXXXXXXXX.appspot.com/o/', 'firestoreApiServer' => "https://firestore.googleapis.com/v1beta1/projects/XXXXXXXXXX/databases/(default)/documents", 'firestoreKey' => "XXXXXXXXXXXXXXXXXXXXXXXXXXX", 'firestoreProjectId' => "XXXXXXXXXX", ], ];

use biottico\firebase\FirestoreQuery;

$query = new FirestoreQuery($config); $data = $query->getDocument("COLLECTION", "DOCUMENT_ID");

var_dump($data);