{"id":36982132,"url":"https://github.com/luqmanrom/firebase-php","last_synced_at":"2026-01-13T22:52:02.607Z","repository":{"id":62509509,"uuid":"78192142","full_name":"luqmanrom/firebase-php","owner":"luqmanrom","description":"Firebase Realtime Database PHP Wrapper ","archived":false,"fork":false,"pushed_at":"2018-05-27T07:46:52.000Z","size":15,"stargazers_count":41,"open_issues_count":3,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-21T01:06:05.382Z","etag":null,"topics":["crud-operation","firebase","firebase-database","firebase-php","firebase-php-wrapper","laravel","laravel-package","packagist","php","php-library"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luqmanrom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-06T09:13:58.000Z","updated_at":"2024-03-05T03:22:50.000Z","dependencies_parsed_at":"2022-11-02T10:16:39.348Z","dependency_job_id":null,"html_url":"https://github.com/luqmanrom/firebase-php","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/luqmanrom/firebase-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanrom%2Ffirebase-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanrom%2Ffirebase-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanrom%2Ffirebase-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanrom%2Ffirebase-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luqmanrom","download_url":"https://codeload.github.com/luqmanrom/firebase-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luqmanrom%2Ffirebase-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28402192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["crud-operation","firebase","firebase-database","firebase-php","firebase-php-wrapper","laravel","laravel-package","packagist","php","php-library"],"created_at":"2026-01-13T22:52:02.029Z","updated_at":"2026-01-13T22:52:02.595Z","avatar_url":"https://github.com/luqmanrom.png","language":"PHP","readme":"# Firebase PHP Wrapper\n\n\n[![Packagist](https://img.shields.io/packagist/dt/geckob/firebase.svg)](https://packagist.org/packages/geckob/firebase)\n\n\nThis package makes the authentication and the basic CRUD\noperation on Firebase Database as simple as possible. \nFor now, it supports both Guzzle 5 and Guzzle 6. \n\n\n## Installation\n\nThe easiest way it via Composer\n\n```\ncomposer require geckob/firebase\n```\n\n## Usages\n\n\n### 1. Authentication\n\n**1.1 Generate Service Account secret file**\n\nThis package supported authentication using secrets file generated in the Service Account page.\n\nTo generate the secret file, follow this steps\n\n1. Go to [Firebase Console](https://console.firebase.google.com/)\n2. Choose your project\n3. Click the gear icon and go to Project Settings\n4. Click the Service Accounts tab\n5. Scroll down and click \"Generate New Private Key\" button. Save it to somewhere secure but \n\taccessible for your internal server\n\n**1.2 Use the secret file to authenticate**\n\n```php\n    $firebase = new \\Geckob\\Firebase\\Firebase('path_to_your_secret_file.json');\n```\n### 2. CRUD Operation\n\nThe CRUD operation on Firebase Database is based on the [Firebase REST API Docs](https://www.firebase.com/docs/rest-api.html).\n\nAssuming the authentication is succesfully done,\n\n```php\n// Set the parent node. \n$firebase = $firebase-\u003esetPath('bookings/');\n\n// Create a new node with key = test and value = testValue. \n// If the node already exist, it will update the value\n$firebase-\u003eset('test','testValue');\n\n// Support multiple nodes, if it doesnt exist, it will create the node\n$firebase-\u003eset('testObject/testKey', 'testValueObject');\n\n\n// Same as set but without keys. This requires to call setPath first to identify the parent\n$firebase-\u003epush([\n\t'test'  =\u003e 'value',\n\t'test1' =\u003e 'value1'\n]);\n\n// Get the value of node with key = test\n$firebase-\u003eget('test');\n\n// Get the value of using multilevel key\n$firebase-\u003eget('testObject/testKey');\n\n\n\n\n// Delete the node with key = test\n$firebase-\u003edelete('test');\n\n// Delete the multilevel node and all it's children\n$firebase-\u003edelete('testObject/testKey');\n\n\n```\n\n// \n\n## Others\n\nThis package works perfectly fine for my use case for now. Should you have any other\nuse cases that requires me to extend the features, or suggestions how this package\ncan be improved, feel free to open issues or email me at luqmanrom@gmail.com\n\n\n## License \n\n#### The MIT License (MIT)\n```\nCopyright (c) 2012-2016 Tamas Kalman\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\t\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluqmanrom%2Ffirebase-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluqmanrom%2Ffirebase-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluqmanrom%2Ffirebase-php/lists"}