PHPackages                             giginc/cakephp3-driver-cloud-firestore - 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. giginc/cakephp3-driver-cloud-firestore

ActiveCakephp-plugin[Database &amp; ORM](/categories/database)

giginc/cakephp3-driver-cloud-firestore
======================================

Cloud Firestore direver for CakePHP 3.5

0.0.2(4y ago)116MITPHPPHP ^5.6|^7.0

Since Aug 10Pushed 4y ago3 watchersCompare

[ Source](https://github.com/giginc/cakephp3-driver-cloud-firestore)[ Packagist](https://packagist.org/packages/giginc/cakephp3-driver-cloud-firestore)[ RSS](/packages/giginc-cakephp3-driver-cloud-firestore/feed)WikiDiscussions master Synced 1mo ago

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

Cloud Firestore Driver for Cakephp3
===================================

[](#cloud-firestore-driver-for-cakephp3)

An Cloud Firestore for CakePHP 3.5,3.6,3.7

Installing via composer
-----------------------

[](#installing-via-composer)

Install [composer](http://getcomposer.org) and run:

```
composer require giginc/cakephp3-driver-cloud-firestore
```

Defining a connection
---------------------

[](#defining-a-connection)

Now, you need to set the connection in your config/app.php file:

```
 'Datasources' => [
...
    'cloud-firestore' => [
        'className' => 'Giginc\CloudFirestore\Database\Connection',
        'driver' => 'Giginc\CloudFirestore\Database\Driver\CloudFirestore',
        'projectId' => env('CLOUD_FIRESTORE_PROJECT_ID', 'project_id'),
        'keyFile' => [], // Console. Ex: json_decode(file_get_contents($path), true).
        'keyFilePath' => null, //The full path to your service account credentials .json file retrieved.
        'retries' => 3,
    ],

],
```

Models
------

[](#models)

After that, you need to load Giginc\\CloudFirestore\\ORM\\Table in your tables class:

### Table

[](#table)

```
//src/Model/Table/ProductsTable.php
namespace App\Model\Table;

use Giginc\CloudFirestore\ORM\Table;

/**
 * ProductsTable Table
 *
 * @uses Table
 * @package Table
 */
class ProductsTable extends Table
{
    public function initialize(array $config)
    {
        parent::initialize($config);

        $this->setTable('products');
    }

    public static function defaultConnectionName()
    {
        return 'cloud-firestore';
    }
}
```

### Entity

[](#entity)

```
//src/Model/Entity/Product.php
namespace App\Model\Entity;

use Cake\ORM\Entity;

/**
 * Product Entity
 *
 * @uses Entity
 * @package Entity
 */
class Product extends Entity
{
    protected $_accessible = [
        '*' => true,
        'id' => false,
    ];

    protected $_virtual = [
    ];
}

## Controllers

```php
namespace App\Controller;

use App\Controller\AppController;

/**
 * Pages Controller
 *
 * @property \App\Model\Table\PagesTable $Pages
 *
 * @method \App\Model\Entity\Review[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = [])
 */
class PagesController extends AppController
{
    /**
     * Index method
     *
     * @access public
     * @return \Cake\Http\Response|void
     */
    public function index()
    {
        $this->loadModel('Products');

        // select
        $data = $this->Products->find()
            ->document('1')
            ->first();

        // insert
        $this->Products->document('1')
            ->insert([
                'name' => 'iPhoneXR',
                'description' => 'iPhoneXR',
                'created_at' => '2021-04-21',
            ]);
    }
}
```

LICENSE
-------

[](#license)

[The MIT License (MIT) Copyright (c) 2021](http://opensource.org/licenses/MIT)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

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.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

1732d ago

### Community

Maintainers

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

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

---

Top Contributors

[![kgws](https://avatars.githubusercontent.com/u/83611?v=4)](https://github.com/kgws "kgws (6 commits)")

---

Tags

cakephpcakephp-pluginfirestore

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/giginc-cakephp3-driver-cloud-firestore/health.svg)

```
[![Health](https://phpackages.com/badges/giginc-cakephp3-driver-cloud-firestore/health.svg)](https://phpackages.com/packages/giginc-cakephp3-driver-cloud-firestore)
```

###  Alternatives

[dereuromark/cakephp-databaselog

A CakePHP plugin for storing and viewing application logs in the database

44165.0k2](/packages/dereuromark-cakephp-databaselog)[pgbi/cakephp3-soft-delete

SoftDelete plugin for CakePHP

87291.9k](/packages/pgbi-cakephp3-soft-delete)[firevel/firequent

Limited implementation of Eloquent based on Firestore.

267.1k](/packages/firevel-firequent)

PHPackages © 2026

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