Skip to content

Commit

Permalink
Added missing documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mreduar committed Mar 26, 2021
1 parent d1af6f6 commit d1796e7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,24 @@ Check if there is no more balance.
$user->hasNoBalance();
```

#### Add reference and description to history

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.
```php
use App\Models\Podcast;

$podcast = Podcast::find(1);

$user->decreaseBalance(2575, [
'description' => 'Purchase of a podcast.',
'reference' => $podcast
]);

$user->increaseBalance(2575, [
'description' => 'Paypal Deposit.'
]);
```

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
Expand Down

0 comments on commit d1796e7

Please sign in to comment.