{"id":15764713,"url":"https://github.com/ctf0/laravel-firebase-broadcast-driver","last_synced_at":"2025-05-07T02:40:44.416Z","repository":{"id":43148289,"uuid":"198957594","full_name":"ctf0/laravel-firebase-broadcast-driver","owner":"ctf0","description":"a firebase broadcast driver for laravel","archived":false,"fork":false,"pushed_at":"2024-09-22T03:06:40.000Z","size":36,"stargazers_count":7,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-11T12:19:31.512Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ctf0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"ctf0"}},"created_at":"2019-07-26T06:14:23.000Z","updated_at":"2024-09-22T03:06:43.000Z","dependencies_parsed_at":"2024-10-25T11:39:15.221Z","dependency_job_id":"1945e2ba-26b1-4d9d-a8bc-01030143cff4","html_url":"https://github.com/ctf0/laravel-firebase-broadcast-driver","commit_stats":{"total_commits":25,"total_committers":4,"mean_commits":6.25,"dds":"0.31999999999999995","last_synced_commit":"7e8d9ce2c83a193d585a922b1c2c192c6a9b532c"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctf0%2Flaravel-firebase-broadcast-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctf0%2Flaravel-firebase-broadcast-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctf0%2Flaravel-firebase-broadcast-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctf0%2Flaravel-firebase-broadcast-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctf0","download_url":"https://codeload.github.com/ctf0/laravel-firebase-broadcast-driver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252802361,"owners_count":21806484,"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":[],"created_at":"2024-10-04T12:04:30.207Z","updated_at":"2025-05-07T02:40:44.388Z","avatar_url":"https://github.com/ctf0.png","language":"PHP","funding_links":["https://github.com/sponsors/ctf0"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    FireBase Broadcast Driver\n    \u003cbr\u003e\n    \u003ca href=\"https://packagist.org/packages/ctf0/firebase-broadcast-driver\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/ctf0/firebase-broadcast-driver.svg\" alt=\"Latest Stable Version\" /\u003e\u003c/a\u003e \u003ca href=\"https://packagist.org/packages/ctf0/firebase-broadcast-driver\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/ctf0/firebase-broadcast-driver.svg\" alt=\"Total Downloads\" /\u003e\u003c/a\u003e\n\u003c/h1\u003e\n\n## Installation\n\n- `composer require ctf0/firebase-broadcast-driver`\n\n- the package internally use [`kreait/firebase-php`](https://firebase-php.readthedocs.io/en/latest/) to send data to firebase.\n\n### Config\n```php\n// config/broadcasting\n\nreturn [\n    'connections' =\u003e [\n        // ...\n\n        'firebase' =\u003e [\n            'driver'          =\u003e 'firebase',\n            'type'            =\u003e 'firestore', // database, firestore or messaging\n            'databaseURL'     =\u003e env('FB_DB_URL'), // the real time database url\n            'creds_file'      =\u003e env('FB_CREDENTIALS_FILE'), // service account json file\n            'collection_name' =\u003e env('FB_COLLECTION_NAME'), // ex.notifications\n        ],\n    ],\n];\n```\n\n### Usage\n\n- add `BROADCAST_DRIVER=firebase` to `.env`\n\n- atm there no support for [laravel-echo](https://laravel.com/docs/5.8/broadcasting#installing-laravel-echo) \"any help is appreciated\" but no worries, you still get the same payload as other broadcast drivers.\n\n    however you can check the [firebase api docs](https://firebase.google.com/docs/database/web/start) or [vuefire](https://github.com/vuejs/vuefire) if you are using `vue`, on how to listen for changes and update your app users accordingly.\n\n#### Notification Data Sample\n```json\n{\n    \"notifications\" : {\n        \"-LkgtAVVw0Ztwyjayd9n\" : {\n            \"channel\" : \"private-App.User.091b0f7e-805b-4aab-8c99-445039157783\",\n            \"data\" : {\n                \"body\" : \"some body\",\n                \"id\" : \"d54c44a2-8a42-43a4-bae0-e2b159d1533b\",\n                \"title\" : \"some title\",\n                \"type\" : \"App\\\\Notifications\\\\AlertUser\"\n            },\n            \"event\" : \"Illuminate\\\\Notifications\\\\Events\\\\BroadcastNotificationCreated\",\n            \"timestamp\": 1564183089538\n        }\n    }\n}\n```\n\n\u003cbr\u003e\n\n### Security\n\nIf you discover any security-related issues, please email [ctf0-dev@protonmail.com](mailto:ctf0-dev@protonmail.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctf0%2Flaravel-firebase-broadcast-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctf0%2Flaravel-firebase-broadcast-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctf0%2Flaravel-firebase-broadcast-driver/lists"}