kreait / laravel-firebase

A Laravel package for the Firebase PHP Admin SDK
https://github.com/kreait/firebase-php
MIT License
992 stars 163 forks source link

Multiple project firestore #128

Closed herilesmana closed 2 years ago

herilesmana commented 2 years ago

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?

herilesmana commented 2 years ago

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