Skip to content

Commit cc91b28

Browse files
committed
update changelog.md
1 parent c4e5d69 commit cc91b28

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

changelog.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [9.1.0] - 2022-08-08
10+
### Added
11+
- TransactionCreatedEvent #538
12+
13+
### Fixed
14+
- Fixed a bug with sending multiple events inside the queue. Extra events were sent.
15+
916
## [9.0.4] - 2022-07-28
1017
### Fixed
1118
- Add allow plugin infection by @rez1dent3 in #528
@@ -889,7 +896,8 @@ The operation is now executed in the transaction and updates the new `refund` fi
889896
- Exceptions: AmountInvalid, BalanceIsEmpty.
890897
- Models: Transfer, Transaction.
891898

892-
[Unreleased]: https://github.com/bavix/laravel-wallet/compare/9.0.4...develop
899+
[Unreleased]: https://github.com/bavix/laravel-wallet/compare/9.1.0...develop
900+
[9.1.0]: https://github.com/bavix/laravel-wallet/compare/9.0.4...9.1.0
893901
[9.0.4]: https://github.com/bavix/laravel-wallet/compare/9.0.3...9.0.4
894902
[9.0.3]: https://github.com/bavix/laravel-wallet/compare/9.0.2...9.0.3
895903
[9.0.2]: https://github.com/bavix/laravel-wallet/compare/9.0.1...9.0.2

docs/_sidebar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
- [BalanceUpdatedEvent](balance-updated-event)
4646
- [WalletCreatedEvent](wallet-created-event)
47+
- [TransactionCreatedEvent](transaction-created-event)
4748
- [Event Customize](event-customize)
4849

4950
- Additions

docs/transaction-created-event.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Tracking the creation of wallet transactions
2+
3+
The events are similar to the events for updating the balance, only for the creation of a wallet. A frequent case of transferring data via websockets to the front-end.
4+
5+
Version 7.3 introduces an interface to which you can subscribe.
6+
This is done using standard Laravel methods.
7+
More information in the [documentation](https://laravel.com/docs/8.x/events).
8+
9+
```php
10+
use Bavix\Wallet\Internal\Events\TransactionCreatedEventInterface;
11+
12+
protected $listen = [
13+
TransactionCreatedEventInterface::class => [
14+
MyWalletTransactionCreatedListener::class,
15+
],
16+
];
17+
```
18+
19+
And then we create a listener.
20+
21+
```php
22+
use Bavix\Wallet\Internal\Events\TransactionCreatedEventInterface;
23+
24+
class MyWalletTransactionCreatedListener
25+
{
26+
public function handle(TransactionCreatedEventInterface $event): void
27+
{
28+
// And then the implementation...
29+
}
30+
}
31+
```
32+
33+
It worked!

0 commit comments

Comments
 (0)