File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -30,18 +30,6 @@ laravel-wallet - Easy work with virtual wallet.
3030
3131To perform the migration, you will be [ helped by the instruction] ( https://laravel-wallet.bavix.ru/2.2/upgrade-guide ) .
3232
33- ### Run Migrations
34- Publish the migrations with this artisan command:
35- ``` bash
36- php artisan vendor:publish --tag=laravel-wallet-migrations
37- ```
38-
39- ### Configuration
40- You can publish the config file with this artisan command:
41- ``` bash
42- php artisan vendor:publish --tag=laravel-wallet-config
43- ```
44-
4533### Usage
4634Add the ` HasWallet ` trait and ` Wallet ` interface to model.
4735``` php
@@ -93,7 +81,7 @@ class Item extends Model implements Product
9381{
9482 use HasWallet;
9583
96- public function canBuy(Customer $customer, bool $force = false ): bool
84+ public function canBuy(Customer $customer, int $quantity = 1, bool $force = null ): bool
9785 {
9886 /**
9987 * If the service can be purchased once, then
@@ -115,6 +103,11 @@ class Item extends Model implements Product
115103 'price' => $this->getAmountProduct(),
116104 ];
117105 }
106+
107+ public function getUniqueId(): string
108+ {
109+ return (string)$this->getKey();
110+ }
118111}
119112```
120113
You can’t perform that action at this time.
0 commit comments