File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ A PHP SDK for Firebase REST API.
1313```
1414composer require adrorocker/php-firebase
1515```
16- -----------------------------------
1716
1817## Usage
1918
@@ -33,15 +32,16 @@ $firebase = new Firebase($base,$token);
3332// Unique ID
3433$id = (new \DateTime())->getTimestamp();
3534
36- $data = ['key' => 'value']; // Or even just a string
35+ // Set the data (body of the request).
36+ $data = ['key' => 'value']; // The data could be even just a string
3737
38- // Make a PUT request and retive the response
39- $put = $firebase->put('/logs/'.$id, $data)->getResponse() ;
38+ // Make a PUT request, the response is return
39+ $put = $firebase->put('/logs/'.$id, $data);
4040
41- // Make a GET request and retive the response, you will see all the logs
42- $get = $firebase->get('/logs')->getResponse();
41+ // Make a GET request, the response is return,
42+ // you will have all the logs in the $get variable
43+ $get = $firebase->get('/logs');
4344```
44- -----------------------------------
4545
4646## Authors:
4747
You can’t perform that action at this time.
0 commit comments