kreait / laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

Home Page:https://github.com/kreait/firebase-php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple project firestore

herilesmana opened this issue · comments

I'm using this line of code for using firestore

$this->firestore = app('firebase.firestore')->database()

So I can get documents of collection using this line of code
$this->firestore->collection('peoples')->documents()

I have no problem with using the default project configuration.

But what if I have multiple project configurations?

Finally i'm using this line of code, and this is working. Thanks
$this->firestore = Firebase::project('project_name')->firestore()->database();