kreait/laravel-firebase
Laravel package integrating the Firebase PHP Admin SDK. Configure via service account credentials, access Firebase services through Laravel-friendly bindings, and support multiple Firebase projects. Maintained under beste org; namespace/package name unchanged.
Firebase Integration as a Core Feature:
Multi-Tenant or Multi-Project Support:
Roadmap Priorities:
Use Cases:
Cost Optimization:
kreait/firebase-php directly)."This package lets us integrate Firebase into our Laravel app with minimal dev effort, reducing time-to-market for features like real-time updates, scalable auth, and file storage. By leveraging Firebase’s managed services, we cut infrastructure costs and improve reliability. For example, we can replace custom auth logic with Firebase Auth—handling 100K+ users seamlessly—while offloading storage to Firebase’s global CDN. The package also supports multi-project setups, ideal for our SaaS roadmap. With 1M+ monthly downloads and MIT licensing, it’s battle-tested and low-risk."
Key Outcomes:
*"This wraps the Firebase Admin PHP SDK in a Laravel-friendly way, handling:
- Auto-discovery of credentials (via
.envor config files).- Multi-project support (e.g.,
Firebase::project('tenant-x')->auth()).- Dependency injection (no manual
new Factory()calls).- Performance optimizations (token caching, HTTP middleware).
Why use it?
- Avoid reinventing Firebase integration (e.g., auth, Firestore queries).
- Leverage Laravel’s config/publishing for Firebase settings.
- Example: Replace
Auth::login()withFirebase::auth()->createCustomToken($user)in 1 line.Trade-offs:
- Tight coupling to Laravel (not framework-agnostic).
- Requires PHP 8.3+ (aligns with Laravel 10+)."*
Action Items:
php artisan vendor:publish --tag=config) to customize credentials/projects.How can I help you explore Laravel packages today?