Closed salarzaidi closed 3 years ago
Hello, @salarzaidi. Not enough information. We need logs.
@salarzaidi The problem is that you are not working with the package correctly.
Argument 2 passed to App\Model\User::deposit() must be of the type array or null, string given App\Model\User->deposit(10, 'test')
no sorry. its not that issue. please check the first image you can see what im runing.
my application stops when deposit function run. i have checked by commenting despite function and it run fine. im not able to deposit and my log not showing that issue.
I need data. We need logs and code, it is better to issue it as a separate project for github, then I can help you.
According to the logs that you provided, there is an error in the incorrect use of the package. The second argument must be an ?array
and you are passing in a string
.
I resolved the problem though don't know what was wrong. I just changed my apache PHP version 7.2 to 7.3 and it's working fine
@salarzaidi minimum version for newer versions of the package https://github.com/bavix/laravel-wallet/blob/bdb09b31ef60d991f586c37759e2a09466a69f8f/composer.json#L26
im just runing documentation testing code nothing else.
User Model
here is my composer file.
```js { "name": "laravel/laravel", "type": "project", "description": "The Laravel Framework.", "keywords": [ "framework", "laravel" ], "license": "MIT", "require": { "php": "^7.2.5|^8.0", "bavix/laravel-wallet": "^6.0", "fideloper/proxy": "^4.4", "laravel/framework": "^6.20", "laravel/tinker": "^2.5", "laravel/ui": "^1", "spatie/laravel-permission": "^4.0", "tymon/jwt-auth": "^1.0" }, "require-dev": { "facade/ignition": "^1.16.4", "fakerphp/faker": "^1.9.1", "mockery/mockery": "^1.0", "nunomaduro/collision": "^3.0", "phpunit/phpunit": "^8.5.8|^9.3.3" }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true }, "extra": { "laravel": { "dont-discover": [] } }, "autoload": { "psr-4": { "App\\": "app/" }, "classmap": [ "database/seeds", "database/factories" ], "files": ["app/Helpers/Helper.php"] }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "minimum-stability": "dev", "prefer-stable": true, "scripts": { "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi" ] } } ```please help me as soon as possible . thanks