-
-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple realtime database support in single project #678
Comments
At the moment, you can achieve this by using the factory with the same ServiceAccount but multiple calls of the use Kreait\Firebase\Factory;
$factory = (new Factory)->withServiceAccount('/path/to/firebase_credentials.json');
// Other components can be instantiated as usual
$auth = $factory->createAuth();
$db1 = $factory->withDatabaseUri('https://first-db.firebaseio.com')->createDatabase();
$db2 = $factory->withDatabaseUri('https://second-rtdb.firebaseio.com')->createDatabase(); If you're using the I realize this isn't very intuitive (the component is from a time in which it wasn't yet possible to have multiple real-time databases 😅), so I'll keep this open as a feature request for a later implementation (probably not in the 5.x branch, though) 🤞 |
I really thank you so much for such a fast feedback! |
@Morfeus73 Thank you for the one-time donation! |
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let me know if that works for you by leaving a 👍. Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions! |
Describe the feature you would like to see
Hi, I have a firebase project that contains multiple realtime databases and I need access to them in Laravel.
I haven't found any information about this.
Thanks in advance.
The text was updated successfully, but these errors were encountered: