bavix / laravel-wallet

It's easy to work with a virtual wallet
https://bavix.github.io/laravel-wallet/
MIT License
1.11k stars 222 forks source link

Too many arguments to function php ERROR for "$user = Auth::user();" to make deposit and withdraw on user connected balance #932

Closed chegmarco1989 closed 4 months ago

chegmarco1989 commented 4 months ago

HELLO.

Using $user = Auth::user(); because I want connected user to make deposit and withdraw, I see on my VS code, $amount (IN: $user->deposit($amount) AND $user->withdraw($amount)) underlines in red with Too many arguments to function php error.

So how to define in my case $user as user connected so that to allow that user connected to deposit and withdraw ???

Please answer me.

rez1dent3 commented 4 months ago

Hello. The question is not related to the package. You need to study the phpdoc annotations: https://docs.phpdoc.org/guide/references/phpdoc/tags/var.html

Example:

/** @var User $user */
$user = Auth::user();