Skip to content

Commit 7209a8f

Browse files
committed
fix readme
1 parent b942522 commit 7209a8f

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,6 @@ laravel-wallet - Easy work with virtual wallet.
3030

3131
To 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
4634
Add 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

0 commit comments

Comments
 (0)