{"id":15024579,"url":"https://github.com/kreait/laravel-firebase","last_synced_at":"2025-04-23T20:56:00.299Z","repository":{"id":39310825,"uuid":"202563339","full_name":"kreait/laravel-firebase","owner":"kreait","description":"A Laravel package for the Firebase PHP Admin SDK","archived":false,"fork":false,"pushed_at":"2025-02-24T22:19:42.000Z","size":247,"stargazers_count":1151,"open_issues_count":1,"forks_count":177,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-01T22:48:52.497Z","etag":null,"topics":["firebase","firebase-auth","firebase-authentication","firebase-cloud-messaging","firebase-database","firebase-realtime-database","firebase-remote-config","firebase-storage","laravel","php","realtime-database"],"latest_commit_sha":null,"homepage":"https://github.com/kreait/firebase-php","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kreait.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"jeromegamez","tidelift":"packagist/kreait/laravel-firebase"}},"created_at":"2019-08-15T15:11:46.000Z","updated_at":"2025-03-31T12:44:33.000Z","dependencies_parsed_at":"2022-07-11T22:31:22.101Z","dependency_job_id":"b27033ce-07ee-4b7c-82de-78729cb48d48","html_url":"https://github.com/kreait/laravel-firebase","commit_stats":{"total_commits":155,"total_committers":19,"mean_commits":8.157894736842104,"dds":"0.21935483870967742","last_synced_commit":"103066238aae1f69a714c009f0aa7217f25ce33c"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kreait%2Flaravel-firebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kreait%2Flaravel-firebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kreait%2Flaravel-firebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kreait%2Flaravel-firebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kreait","download_url":"https://codeload.github.com/kreait/laravel-firebase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947803,"owners_count":21023066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","firebase-auth","firebase-authentication","firebase-cloud-messaging","firebase-database","firebase-realtime-database","firebase-remote-config","firebase-storage","laravel","php","realtime-database"],"created_at":"2024-09-24T20:00:35.777Z","updated_at":"2025-04-09T00:12:09.881Z","avatar_url":"https://github.com/kreait.png","language":"PHP","funding_links":["https://github.com/sponsors/jeromegamez","https://tidelift.com/funding/github/packagist/kreait/laravel-firebase"],"categories":[],"sub_categories":[],"readme":"# Firebase for Laravel\n\nA Laravel package for the [Firebase PHP Admin SDK](https://github.com/kreait/firebase-php).\n\n[![Current version](https://img.shields.io/packagist/v/kreait/laravel-firebase.svg?logo=composer)](https://packagist.org/packages/kreait/laravel-firebase)\n[![Monthly Downloads](https://img.shields.io/packagist/dm/kreait/laravel-firebase.svg)](https://packagist.org/packages/kreait/laravel-firebase/stats)\n[![Total Downloads](https://img.shields.io/packagist/dt/kreait/laravel-firebase.svg)](https://packagist.org/packages/kreait/laravel-firebase/stats)\n[![Tests](https://github.com/kreait/laravel-firebase/workflows/Tests/badge.svg?branch=main)](https://github.com/kreait/laravel-firebase/actions)\n[![codecov](https://codecov.io/gh/kreait/laravel-firebase/branch/main/graph/badge.svg)](https://codecov.io/gh/kreait/laravel-firebase)\n[![Sponsor](https://img.shields.io/static/v1?logo=GitHub\u0026label=Sponsor\u0026message=%E2%9D%A4\u0026color=ff69b4)](https://github.com/sponsors/jeromegamez)\n\n---\n\n## The future of the Firebase Admin PHP SDK\n\nPlease read about the future of the Firebase Admin PHP SDK on the\n[SDK's GitHub Repository](https://github.com/kreait/firebase-php).\n\n---\n\n- [Installation](#installation)\n  - [Laravel](#laravel)\n- [Configuration](#configuration)\n  - [Credentials with JSON files](#credentials-with-json-files)\n  - [Credentials with Arrays](#credentials-with-arrays)\n- [Usage](#usage)\n  - [Multiple projects](#multiple-projects)\n- [Supported Versions](#supported-versions)\n- [License](#license)\n\n## Installation\n\n```bash\ncomposer require kreait/laravel-firebase\n```\n\n## Configuration\n\nIn order to access a Firebase project and its related services using a server SDK, requests must be authenticated.\nFor server-to-server communication this is done with a Service Account.\n\nIf you don't already have generated a Service Account, you can do so by following the instructions from the\nofficial documentation pages at https://firebase.google.com/docs/admin/setup#initialize_the_sdk_in_non-google_environments.\n\nOnce you have downloaded the Service Account JSON file, you can configure the package by specifying\nenvironment variables starting with `FIREBASE_` in your `.env` file. Usually, the following are\nrequired for the package to work:\n\n```\n# You can find the database URL for your project at\n# https://console.firebase.google.com/project/_/database\nFIREBASE_DATABASE_URL=https://\u003cyour-project\u003e.firebaseio.com\n```\n\nFor further configuration, please see [config/firebase.php](config/firebase.php). You can modify the configuration\nby copying it to your local `config` directory or by defining the environment variables used in the config file:\n\n```bash\n# Laravel\nphp artisan vendor:publish --provider=\"Kreait\\Laravel\\Firebase\\ServiceProvider\" --tag=config\n```\n\n### Credentials with JSON files\n\nThe package uses auto discovery for the default project to find the credentials needed for authenticating requests to\nthe Firebase APIs by inspecting certain environment variables and looking into Google's well known path(s).\n\nIf you don't want a service account to be auto-discovered, provide it by setting the `FIREBASE_CREDENTIALS` or `GOOGLE_APPLICATION_CREDENTIALS` environment variable or by adapting the package configuration, like so for example:\n\n```.env\nFIREBASE_CREDENTIALS=storage/app/firebase-auth.json\n```\n\n### Credentials with Arrays\n\nIf you prefer to have more control over the configuration items required to configure the credentials, you can also transpose the Service Account JSON file as an array within your `config/firebase.php` file.\n\n```php\n'credentials' =\u003e [\n    'type' =\u003e 'service_account',\n    'project_id' =\u003e 'some-project-123',\n    'private_key_id' =\u003e '123456789',\n    'private_key' =\u003e '-----BEGIN PRIVATE KEY-----\\nFOO_BAR_123456789\\n-----END PRIVATE KEY-----\\n',\n    'client_email' =\u003e 'firebase-adminsdk-cwiuo@some-project-123.iam.gserviceaccount.com',\n    'client_id' =\u003e '123456789',\n    'auth_uri' =\u003e 'https://accounts.google.com/o/oauth2/auth',\n    'token_uri' =\u003e 'https://oauth2.googleapis.com/token',\n    'auth_provider_x509_cert_url' =\u003e 'https://www.googleapis.com/oauth2/v1/certs',\n    'client_x509_cert_url' =\u003e 'https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-cwiuo%40some-project-123.iam.gserviceaccount.com',\n    'universe_domain' =\u003e 'googleapis.com',\n],\n```\n\n## Usage\n\nOnce you have retrieved a component, please refer to the [documentation of the Firebase PHP Admin SDK](https://firebase-php.readthedocs.io)\nfor further information on how to use it.\n\n**You don't need and should not use the `new Factory()` pattern described in the SDK documentation, this is already\ndone for you with the Laravel Service Provider. Use Dependency Injection, the Facades or the `app()` helper instead**\n\n### Multiple projects\n\nMultiple projects can be configured in [config/firebase.php](config/firebase.php) by adding another section to the projects array.\n\nWhen accessing components, the facade uses the default project. You can also explicitly use a project:\n\n```php\nuse Kreait\\Laravel\\Firebase\\Facades\\Firebase;\n\n// Return an instance of the Auth component for the default Firebase project\n$defaultAuth = Firebase::auth();\n// Return an instance of the Auth component for a specific Firebase project\n$appAuth = Firebase::project('app')-\u003eauth();\n$anotherAppAuth = Firebase::project('another-app')-\u003eauth();\n```\n\n## Supported Versions\n\n**Only the latest version is actively supported.**\n\nEarlier versions will receive security fixes as long as their **lowest** SDK requirement receives security fixes. You\ncan find the currently supported versions and support options in the [SDK's README](https://github.com/kreait/firebase-php).\n\n| Version | Initial Release | Supported SDK Versions | Supported Laravel Versions | Status       |\n|---------|-----------------|------------------------|----------------------------|--------------|\n| `6.x`   | 24 Feb 2025     | `^7.0`                 | `^11.0`, `^12.0`           | Active       |\n| `5.x`   | 13 Jan 2023     | `^7.0`                 | `^9.0`, `^10.0`, `^11.0`   | Paid support |\n| `4.x`   | 09 Jan 2022     | `^6.0`                 | `^8.0`                     | End of life  |\n| `3.x`   | 01 Nov 2020     | `^5.24`                | `^6.0, ^7.0, ^8.0`         | End of life  |\n| `2.x`   | 01 Apr 2020     | `^5.0`                 | `^5.8, ^6.0, ^7.0, ^8.0`   | End of life  |\n| `1.x`   | 17 Aug 2019     | `^4.40.1`              | `^5.8, ^6.0, ^7.0`         | End of life  |\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\nYour use of Firebase is governed by the [Terms of Service for Firebase Services](https://firebase.google.com/terms/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkreait%2Flaravel-firebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkreait%2Flaravel-firebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkreait%2Flaravel-firebase/lists"}