Skip to content

Commit d1796e7

Browse files
committed
Added missing documentation.
1 parent d1af6f6 commit d1796e7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,24 @@ Check if there is no more balance.
9696
$user->hasNoBalance();
9797
```
9898

99+
#### Add reference and description to history
100+
101+
It is possible to add a reference to any of the above methods by passing an array as a second parameter with the data of the referenced model and a description.
102+
```php
103+
use App\Models\Podcast;
104+
105+
$podcast = Podcast::find(1);
106+
107+
$user->decreaseBalance(2575, [
108+
'description' => 'Purchase of a podcast.',
109+
'reference' => $podcast
110+
]);
111+
112+
$user->increaseBalance(2575, [
113+
'description' => 'Paypal Deposit.'
114+
]);
115+
```
116+
99117
## Contributing
100118

101119
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

0 commit comments

Comments
 (0)