Polyscope - The agent-first dev environment for Laravel

Laravel Firebase

kreait/laravel-firebase image

Laravel Firebase stats

Downloads
5.1M
Stars
862
Open Issues
3
Forks
144

View on GitHub →

A Laravel package for the Firebase PHP Admin SDK

Firebase for Laravel

This Laravel package integrates your application with Firebase using the Firebase PHP Admin SDK, allowing seamless interaction with Firebase services directly from your Laravel projects.

Key Features

  • Ease of Installation: Simply use Composer to get started with composer require kreait/laravel-firebase.
  • Automatic Configuration: Leverages environment variables and Google's known paths for hassle-free setup of service accounts.
  • Support for Multiple Projects: Easily manage multiple Firebase projects within the same Laravel application.
  • Streamlined Usage: Utilizes Laravel's Service Providers, avoiding the need for manual SDK bootstrapping. Supports Dependency Injection and Facades for straightforward code.
  • Active Support: Regular updates and security patches, with detailed version support aligned with Laravel's releases.

Installation and Configuration

Install the package via Composer:

composer require kreait/laravel-firebase

For authentication, set up a Firebase Service Account by downloading the JSON file and configuring the FIREBASE_DATABASE_URL in your .env file:

FIREBASE_DATABASE_URL=https://<your-project>.firebaseio.com

Further customize settings by publishing the config file to your Laravel config directory:

php artisan vendor:publish --provider="Kreait\Laravel\Firebase\ServiceProvider" --tag=config

Usage

Access Firebase components using the Laravel facade without needing to instantiate new Factory objects:

use Kreait\Laravel\Firebase\Facades\Firebase;
 
$defaultAuth = Firebase::auth(); // Default Firebase project
$appAuth = Firebase::project('app')->auth(); // Specific Firebase project

Refer to the Firebase PHP Admin SDK documentation for more detailed usage instructions.

Supported Versions

This package only actively supports the latest version (5.x as of now), which is compatible with Laravel ^9.0. Older versions receive only security updates. Check the SDK’s README for a detailed look at supported versions across different Laravel releases.

This package is ideal for developers looking to leverage Firebase within their Laravel applications efficiently, with minimal setup and robust support for various Firebase functionalities.

kreait photo

… is now elvah

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Kreait Laravel Firebase Related Articles

Send Notifications in Laravel with Firebase Cloud Messaging and Notifire image

Send Notifications in Laravel with Firebase Cloud Messaging and Notifire

Read article
Firebase Cloud Notifications for Laravel image

Firebase Cloud Notifications for Laravel

Read article
Firebase Cloud Messaging for Laravel image

Firebase Cloud Messaging for Laravel

Read article
Statamic logo

Statamic

The drop-in ready Laravel CMS you’re been waiting for. Go full-stack or headless, flat file or database – it’s up to you.

Statamic
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Typesense Search logo

Typesense Search

Typesense is an open source, blazing-fast search engine, optimized for helping you build delightful search experiences for your sites and apps. Natively integrated with Laravel Scout.

Typesense Search
The Certification of Competence for Laravel logo

The Certification of Competence for Laravel

A community-driven, proctored assessment across 4 levels designed to validate real-world Laravel knowledge, from Junior to mastery-level Artisan. Official Vue.js, Official Nuxt, Angular, React, JS certifications also available.

The Certification of Competence for Laravel
SerpApi logo

SerpApi

Access real-time search engine results through a simple API—no more scraping headaches! Use it for AI applications, SEO tools, product research, travel information, and more

SerpApi