PHPackages                             coderatio/phpfirebase - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. coderatio/phpfirebase

ActiveLibrary[Database &amp; ORM](/categories/database)

coderatio/phpfirebase
=====================

A simple and clean CRUD PHP library for Google Firebase datastore

v1.0(7y ago)2937061MITPHPPHP ^7.0

Since Nov 22Pushed 7y agoCompare

[ Source](https://github.com/coderatio/phpfirebase)[ Packagist](https://packagist.org/packages/coderatio/phpfirebase)[ RSS](/packages/coderatio-phpfirebase/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (2)Versions (2)Used By (1)

PHP Firebase
============

[](#php-firebase)

A simple and clean CRUD PHP library for Google Firebase datastore. This library, allows you to create, read, update and delete records stored on your Google Firebase database.

Installation
------------

[](#installation)

To intall the library, kindly execute the command `composer require coderatio/phpfirebase:v1.0` Or `composer require coderatio/phpfirebase`.

How to use
----------

[](#how-to-use)

To start using, make sure you create a folder and save your Google Firebase service account key json file.

Creating new records (C)
------------------------

[](#creating-new-records-c)

To create new record, do this...

```
require 'vendor/autoload';
use Coderatio\PhpFirebase\PhpFirebase;

$pfb = new PhpFirebase($pathToSecretKeyJsonFile);
$pfb->setTable('posts');
$pfb->insertRecord([
    'title' => 'Post one',
    'body' => 'Post one contents'
  ], $returnData);
  //The $returnData which is boolean returns inserted data if set to true. Default is false.
```

Reading records (R)
-------------------

[](#reading-records-r)

To read created records, do this...

```
// Getting all records
$pfb->getRecords();

// Getting a record. Note: This can only be done via the record id.
$pfb->getRecord(1);
```

Updating records (U)
--------------------

[](#updating-records-u)

To update a record, do this...

```
// This takes the record ID and any column you want to update.
$pfb->updateRecord(1, [
  'title' => 'Post one edited'
]);
```

Deleting records (D)
--------------------

[](#deleting-records-d)

To delete created record, do this...

```
 // This takes only the record ID. Deleting all records will be added in Beta-2

 $pfb->deleteRecord(1);
```

Contribution
------------

[](#contribution)

Kindly send fork the repo and send a pull request or find me on [Twitter](https://twitter.com/josiahoyahaya)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

2

Last Release

2726d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fea9ba733bfacc874e120052eba943294e7513b41597c2e51693b07e26942adc?d=identicon)[josiahoyahaya](/maintainers/josiahoyahaya)

---

Top Contributors

[![coderatio](https://avatars.githubusercontent.com/u/36877085?v=4)](https://github.com/coderatio "coderatio (14 commits)")

### Embed Badge

![Health badge](/badges/coderatio-phpfirebase/health.svg)

```
[![Health](https://phpackages.com/badges/coderatio-phpfirebase/health.svg)](https://phpackages.com/packages/coderatio-phpfirebase)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[kreait/laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

1.3k16.5M42](/packages/kreait-laravel-firebase)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[kreait/firebase-bundle

Symfony Bundle for the Firebase Admin SDK

1534.7M2](/packages/kreait-firebase-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
