Skip to content

Commit fe337ef

Browse files
committed
Update README
1 parent 360ee2d commit fe337ef

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Usage
9494
* Extends your model with `BaoPham\DynamoDb\DynamoDbModel`, then you can use Eloquent methods that are supported. The idea here is that you can switch back to Eloquent without changing your queries.
9595
* Or if you want to sync your DB table with a DynamoDb table, use trait `BaoPham\DynamoDb\ModelTrait`, it will call a `PutItem` after the model is saved.
9696
* Alternatively, you can use the [query builder](#query-builder) facade to build more complex queries.
97-
* AWS SDK v3 for PHP uses guzzlehttp promises to allow for asynchronous workflows. Using this package you can run eloquent queries like [delete](#find-and-delete), [update](#updateasync), [save](#saveasync) asynchronously on DynamoDb.
97+
* AWS SDK v3 for PHP uses guzzlehttp promises to allow for asynchronous workflows. Using this package you can run eloquent queries like [delete](#deleteasync), [update](#updateasync), [save](#saveasync) asynchronously on DynamoDb.
9898

9999
### Supported features:
100100

@@ -201,7 +201,7 @@ $nextPage = $query->afterKey($last->getKeys())->limit(2)->all();
201201
$model->update($attributes);
202202
```
203203
204-
#### updateasync()
204+
#### updateAsync()
205205
206206
```php
207207
// update asynchronously and wait on the promise for completion.
@@ -220,9 +220,10 @@ $model->id = 'de305d54-75b4-431b-adb2-eb6b9e546014';
220220
$model->save();
221221
```
222222
223-
#### saveasync()
224-
**Examples**
223+
#### saveAsync()
224+
225225
Saving single model asynchronously and waiting on the promise for completion.
226+
226227
```php
227228
$model = new Model();
228229
// Define fillable attributes in your Model class.
@@ -232,7 +233,9 @@ $model->fillableAttr2 = 'bar';
232233
$model->id = 'de305d54-75b4-431b-adb2-eb6b9e546014';
233234
$model->saveAsync()->wait();
234235
```
236+
235237
Saving multiple models asynchronously and waiting on all of them simultaneously.
238+
236239
```php
237240
for($i = 0; $i < 10; $i++){
238241
$model = new Model();
@@ -254,7 +257,7 @@ for($i = 0; $i < 10; $i++){
254257
$model->delete();
255258
```
256259
257-
#### deleteasync()
260+
#### deleteAsync()
258261
259262
```php
260263
$model->deleteAsync()->wait();

0 commit comments

Comments
 (0)