Closed ISNewton closed 2 months ago
Hello. transactions
returns all transactions of all wallets by holder. You need to use walletTransactions
.
$students = Student::query()
- ->with('wallets.transactions')
+ ->with('wallets.walletTransactions')
->get();
And for wallets, refer to the walletTransactions relation.
If you need all transactions of all wallets by holder, then use transactions
.
$students = Student::query()
->with('transactions')
->get();
I updated the code to :
$students = Student::query()
->with(['wallets.walletTransactions'])
->get();
I got this error :
TypeError: Bavix\Wallet\Internal\Events\WalletCreatedEvent::__construct(): Argument #1 ($holderType) must be of type string, null given, called in /my_project_path/vendor/bavix/laravel-wallet/src/Internal/Assembler/WalletCreatedEventAssembler.php on line 23 and defined in /my_project_path/vendor/bavix/laravel-wallet/src/Internal/Events/WalletCreatedEvent.php:17
I believe it is related to this issue: https://github.com/bavix/laravel-wallet/issues/613#issuecomment-1339657093
I believe it is related to this issue: https://github.com/bavix/laravel-wallet/issues/613#issuecomment-1339657093
The problems are a little different.
I got this error :
You need to update to at least laravel-wallet 10.0+ for this to work. Unfortunately, this won't work on versions below 10. I had to change the internal structure of the project very much.
Proof: https://github.com/bavix/laravel-wallet/commit/c6583a76050e7c48dad4da927d392083a1cb4a33 You can run this test locally.
Version 7.x has not been supported for almost two years.
Thanks @rez1dent3 .
Describe the bug I need to eager load user wallets with their transactions :
I get the follwing error :
Trace Error
Server: