PHPackages                             quanvt/laravel-firebase-sync - 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. quanvt/laravel-firebase-sync

Abandoned → [quanvt/laravel-firebase-sync](/?search=quanvt%2Flaravel-firebase-sync)Library[Database &amp; ORM](/categories/database)

quanvt/laravel-firebase-sync
============================

Synchronize your Eloquent models with a Firebase realtime database.

03151PHP

Pushed 5y ago1 watchersCompare

[ Source](https://github.com/VuTheQuan/laravel-firebase-sync)[ Packagist](https://packagist.org/packages/quanvt/laravel-firebase-sync)[ RSS](/packages/quanvt-laravel-firebase-sync/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersionsUsed By (0)

Laravel Firebase Sync
=====================

[](#laravel-firebase-sync)

Synchronize your Eloquent models with the [Firebase Realtime Database](https://firebase.google.com/docs/database/)
------------------------------------------------------------------------------------------------------------------

[](#synchronize-your-eloquent-models-with-the-firebase-realtime-database)

Contents
--------

[](#contents)

- [Installation](#installation)
- [Usage](#usage)

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

[](#installation)

In order to add Laravel Firebase Sync to your project, just add

```
"quanvt/laravel-firebase-sync": "^1.0"

```

to your composer.json. Then run `composer install` or `composer update`.

Or run `composer require quanvt/laravel-firebase-sync ` if you prefer that.

Usage
-----

[](#usage)

### Configuration

[](#configuration)

This package requires firebase config `config/firebase.json` file:

or you can add the following section to your `config/services.php` file:

```
'firebase' => [
    "type" => "service_account",
    "project_id" => "your_firebase_project_id",
    "private_key_id" => "your_firebase_private_key_id",
    "private_key" => "your_firebase_private_key",
    "client_id" => "your_firebase_client_id",
    "auth_uri" => "your_firebase_auth_uri",
    "token_uri" => "your_firebase_token_uri",
    "auth_provider_x509_cert_url" => "your_firebase_auth_provider_x509_cert_url",
    "client_x509_cert_url" => "your_firebase_client_x509_cert_url",
    "database_url" => "your_firebase_database_url"
]
```

### Synchronizing models

[](#synchronizing-models)

To synchronize your Eloquent models with the Firebase realtime database, simply let the models that you want to synchronize with Firebase use the `QuanVT\Firebase\SyncWithFirebase` trait.

```
use QuanVT\Firebase\SyncWithFirebase;

class User extends Model {

    use SyncWithFirebase;

}
```

The data that will be synchronized is the array representation of your model. That means that you can modify the data using the existing Eloquent model attributes like `visible`, `hidden` or `appends`.

If you need more control over the data that gets synchronized with Firebase, you can override the `getFirebaseSyncData` of the `SyncsWithFirebase` trait and let it return the array data you want to send to Firebase.

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity8

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![VuTheQuan](https://avatars.githubusercontent.com/u/46616459?v=4)](https://github.com/VuTheQuan "VuTheQuan (1 commits)")

### Embed Badge

![Health badge](/badges/quanvt-laravel-firebase-sync/health.svg)

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

###  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)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M545](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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