PHPackages                             kottergroup/firebase - 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. [API Development](/categories/api)
4. /
5. kottergroup/firebase

ActiveLibrary[API Development](/categories/api)

kottergroup/firebase
====================

PHP package for Firebase wrapper

v1.0.5(5y ago)01.2kMITPHPPHP &gt;=5.3.0

Since Jan 6Pushed 5y ago3 watchersCompare

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

READMEChangelogDependencies (5)Versions (10)Used By (0)

Firebase PHP Wrapper
====================

[](#firebase-php-wrapper)

[![Packagist](https://camo.githubusercontent.com/c8b8f87ed3ba971cce2e90de8040acec27cb176cd31708d6f14d64bfaabfacf2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6765636b6f622f66697265626173652e737667)](https://packagist.org/packages/geckob/firebase)

This package makes the authentication and the basic CRUD operation on Firebase Database as simple as possible. For now, it supports both Guzzle 5 and Guzzle 6.

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

[](#installation)

The easiest way it via Composer

```
composer require geckob/firebase

```

Usages
------

[](#usages)

### 1. Authentication

[](#1-authentication)

**1.1 Generate Service Account secret file**

This package supported authentication using secrets file generated in the Service Account page.

To generate the secret file, follow this steps

1. Go to [Firebase Console](https://console.firebase.google.com/)
2. Choose your project
3. Click the gear icon and go to Project Settings
4. Click the Service Accounts tab
5. Scroll down and click "Generate New Private Key" button. Save it to somewhere secure but accessible for your internal server

**1.2 Use the secret file to authenticate**

```
    $firebase = new \Geckob\Firebase\Firebase('path_to_your_secret_file.json');
```

### 2. CRUD Operation

[](#2-crud-operation)

The CRUD operation on Firebase Database is based on the [Firebase REST API Docs](https://www.firebase.com/docs/rest-api.html).

Assuming the authentication is succesfully done,

```
// 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 requires to call setPath first to identify the parent
$firebase->patch([
	'firstname'  => 'value',
	'lastname' => 'value1'
]);

// Same as set but without keys. This requires to call setPath first to identify the parent
$firebase->push([
	'test'  => 'value',
	'test1' => 'value1'
]);

// Get the value of node with key = test
$firebase->get('test');

// Get the value of using multilevel key
$firebase->get('testObject/testKey');

// Delete the node with key = test
$firebase->delete('test');

// Delete the multilevel node and all it's children
$firebase->delete('testObject/testKey');
```

//

Others
------

[](#others)

This package works perfectly fine for my use case for now. Should you have any other use cases that requires me to extend the features, or suggestions how this package can be improved, feel free to open issues or email me at

License
-------

[](#license)

#### The MIT License (MIT)

[](#the-mit-license-mit)

```
Copyright (c) 2012-2016 Tamas Kalman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 82.1% 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 ~180 days

Recently: every ~218 days

Total

8

Last Release

2153d ago

Major Versions

v0.1.2 → v1.0.12018-01-30

### Community

Maintainers

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

---

Top Contributors

[![luqmanrom](https://avatars.githubusercontent.com/u/6434819?v=4)](https://github.com/luqmanrom "luqmanrom (23 commits)")[![keithgallant](https://avatars.githubusercontent.com/u/2333003?v=4)](https://github.com/keithgallant "keithgallant (5 commits)")

---

Tags

googlefirebasefirebase phpfirebase laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kottergroup-firebase/health.svg)

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

###  Alternatives

[google/apiclient

Client library for Google APIs

9.8k191.4M997](/packages/google-apiclient)[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[geckob/firebase

PHP package for Firebase wrapper

4251.9k](/packages/geckob-firebase)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)[googleads/googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP

67410.3M25](/packages/googleads-googleads-php-lib)

PHPackages © 2026

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