Skip to content

Commit 34e2b40

Browse files
committed
Eloquent model interaction documentation
1 parent a338743 commit 34e2b40

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,12 @@ $client->auth("auth_basic", ["username", "password"])->get("https://example.com"
4848
$client->authBasic(["username", "password"])->get("https://example.com");
4949
$client->authBearer("tokenhere")->get("https://example.com");
5050
```
51+
52+
### Eloquent interaction
53+
You can use your Eloquent models as data source for request
54+
```php
55+
$model = User::find(1);
56+
$client->setModel($model)->fetchModel()->post("https://example.com");
57+
// You can also use short variant
58+
$client->fetchModel($model)->post("https://example.com");
59+
```

0 commit comments

Comments
 (0)