Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Firebase Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Firebase Integration as a Core Feature:

    • Accelerate development of apps requiring Firebase services (Auth, Realtime Database, Firestore, Storage, Messaging, etc.) by reducing boilerplate and abstracting SDK complexity.
    • Enable build vs. buy decision for Firebase features (e.g., replace custom auth logic with Firebase Auth).
  • Multi-Tenant or Multi-Project Support:

    • Deploy a single Laravel app managing multiple Firebase projects (e.g., SaaS platforms with isolated tenant databases).
    • Example: A marketplace where each vendor has their own Firebase project for data isolation.
  • Roadmap Priorities:

    • Phase 1: Integrate Firebase Auth for user management (passwordless, OAuth, email/password).
    • Phase 2: Add Firestore/Realtime Database for real-time collaboration features (e.g., live chat, dashboards).
    • Phase 3: Implement Firebase Storage for file uploads (e.g., user avatars, media).
  • Use Cases:

    • Authentication: Replace Laravel’s default auth with Firebase Auth for scalability (e.g., 100K+ users).
    • Real-Time Features: Power live updates (e.g., stock tickers, multiplayer games) with Firestore.
    • Offline-First Apps: Leverage Firebase’s offline persistence for mobile/web apps.
    • Analytics/CRM: Sync user data between Laravel and Firebase for analytics (e.g., track feature usage).
  • Cost Optimization:

    • Reduce cloud infrastructure costs by offloading auth/storage to Firebase’s managed services.
    • Example: Replace self-hosted Redis for sessions with Firebase Auth + Firestore.

When to Consider This Package

Adopt This Package If:

  • Your Laravel app requires Firebase services (Auth, Firestore, Realtime DB, Storage, etc.) and you want to avoid manual SDK integration.
  • You need multi-project support (e.g., managing multiple Firebase projects from one Laravel app).
  • Your team prefers Laravel’s dependency injection over raw Firebase PHP SDK instantiation.
  • You’re using Laravel 10+ (supports up to Laravel 13 as of 2026).
  • You need environment-based configuration (e.g., staging/production Firebase projects).
  • You want built-in caching for Firebase tokens or HTTP clients to improve performance.

Look Elsewhere If:

  • You’re not using Laravel (this package is Laravel-specific; use kreait/firebase-php directly).
  • You need Firebase Client SDK (for client-side apps; this is for server-side/admin SDK).
  • Your app requires Firebase Extensions (e.g., BigQuery, Predictions) not covered by the Admin SDK.
  • You’re on PHP <8.3 (minimum requirement due to underlying SDK constraints).
  • You need custom Firebase features not exposed by the Admin SDK (e.g., Firebase Hosting).
  • You prefer serverless (e.g., Cloud Functions) over Laravel-based Firebase integration.

How to Pitch It (Stakeholders)

For Executives:

"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:

  • Faster feature delivery (e.g., real-time dashboards in 2 weeks vs. 2 months).
  • Lower ops overhead (no need to manage auth/storage servers).
  • Scalability for user growth without rearchitecting.

For Engineering:

*"This wraps the Firebase Admin PHP SDK in a Laravel-friendly way, handling:

  • Auto-discovery of credentials (via .env or 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() with Firebase::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:

  1. Spike: Test integration with Firebase Auth/Firestore in a staging environment.
  2. Config: Publish the package’s config (php artisan vendor:publish --tag=config) to customize credentials/projects.
  3. Monitor: Use Firebase’s logging to debug HTTP requests if needed.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation