Skip to content

Commit 9236a49

Browse files
committed
Update README.md
1 parent 8b7b636 commit 9236a49

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ A PHP SDK for Firebase REST API.
1313
```
1414
composer 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

0 commit comments

Comments
 (0)