Download the PHP package giginc/cakephp3-driver-cloud-firestore without Composer
On this page you can find all versions of the php package giginc/cakephp3-driver-cloud-firestore. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download giginc/cakephp3-driver-cloud-firestore
More information about giginc/cakephp3-driver-cloud-firestore
Files in giginc/cakephp3-driver-cloud-firestore
Package cakephp3-driver-cloud-firestore
Short Description Cloud Firestore direver for CakePHP 3.5
License MIT
Informations about the package cakephp3-driver-cloud-firestore
Cloud Firestore Driver for Cakephp3
An Cloud Firestore for CakePHP 3.5,3.6,3.7
Installing via composer
Install composer and run:
Defining a connection
Now, you need to set the connection in your config/app.php file:
Models
After that, you need to load Giginc\CloudFirestore\ORM\Table in your tables class:
Table
Entity
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', ]); } }