{"id":16409671,"url":"https://github.com/coderatio/phpfirebase","last_synced_at":"2025-03-21T03:31:22.830Z","repository":{"id":56955600,"uuid":"158139816","full_name":"coderatio/phpfirebase","owner":"coderatio","description":"A simple and clean CRUD PHP library for Google Firebase datastore","archived":false,"fork":false,"pushed_at":"2018-12-02T14:22:13.000Z","size":21,"stargazers_count":29,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-12T06:21:17.404Z","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/coderatio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-19T00:12:52.000Z","updated_at":"2021-03-30T17:52:56.000Z","dependencies_parsed_at":"2022-08-21T08:50:35.359Z","dependency_job_id":null,"html_url":"https://github.com/coderatio/phpfirebase","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderatio%2Fphpfirebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderatio%2Fphpfirebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderatio%2Fphpfirebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderatio%2Fphpfirebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderatio","download_url":"https://codeload.github.com/coderatio/phpfirebase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221811376,"owners_count":16884305,"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-11T06:20:48.163Z","updated_at":"2024-10-28T09:14:15.757Z","avatar_url":"https://github.com/coderatio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Firebase\nA simple and clean CRUD PHP library for Google Firebase datastore.\nThis library, allows you to create, read, update and delete records stored on your Google Firebase database.\n\n## Installation\nTo intall the library, kindly execute the command `composer require coderatio/phpfirebase:v1.0` Or `composer require coderatio/phpfirebase`.\n\n## How to use\nTo start using, make sure you create a folder and save your Google Firebase service account key json file.\n\n## Creating new records (C)\nTo create new record, do this...\n```php\nrequire 'vendor/autoload';\nuse Coderatio\\PhpFirebase\\PhpFirebase;\n\n$pfb = new PhpFirebase($pathToSecretKeyJsonFile);\n$pfb-\u003esetTable('posts');\n$pfb-\u003einsertRecord([\n    'title' =\u003e 'Post one',\n    'body' =\u003e 'Post one contents'\n  ], $returnData);\n  //The $returnData which is boolean returns inserted data if set to true. Default is false.\n```\n\n## Reading records (R)\nTo read created records, do this...\n```php\n// Getting all records\n$pfb-\u003egetRecords();\n\n// Getting a record. Note: This can only be done via the record id.\n$pfb-\u003egetRecord(1); \n```\n\n## Updating records (U)\nTo update a record, do this...\n```php\n// This takes the record ID and any column you want to update.\n$pfb-\u003eupdateRecord(1, [\n  'title' =\u003e 'Post one edited'\n]);\n\n```\n\n## Deleting records (D)\nTo delete created record, do this...\n```php\n // This takes only the record ID. Deleting all records will be added in Beta-2\n \n $pfb-\u003edeleteRecord(1);\n```\n\n## Contribution\nKindly send fork the repo and send a pull request or find me on \u003ca href=\"https://twitter.com/josiahoyahaya\"\u003eTwitter\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderatio%2Fphpfirebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderatio%2Fphpfirebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderatio%2Fphpfirebase/lists"}