Skip to content

Commit b942522

Browse files
author
Babichev Maxim
committed
update docs
1 parent 527b573 commit b942522

File tree

9 files changed

+66
-8
lines changed

9 files changed

+66
-8
lines changed

docs/_sidebar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- [Deposit](deposit)
1212
- [Withdraw](withdraw)
1313
- [Transfer](transfer)
14-
- [Recalculate balance](recalculate)
14+
- [Refresh balance](refresh)
1515

1616
- Purchases
1717

docs/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@
2323
}
2424
</script>
2525
<script src="https://unpkg.com/docsify/lib/docsify.min.js"></script>
26+
<script src="https://unpkg.com/prismjs/components/prism-bash.min.js"></script>
27+
<script src="https://unpkg.com/prismjs/components/prism-php.min.js"></script>
2628
</body>
2729
</html>

docs/installation.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ composer req bavix/laravel-wallet
1010

1111
Ensure that you’ve set up your project to [autoload Composer-installed packages](https://getcomposer.org/doc/01-basic-usage.md#autoloading).
1212

13-
## Run Migrations
13+
## You can use it for customization
14+
15+
Sometimes it is useful...
16+
17+
### Run Migrations
1418
Publish the migrations with this artisan command:
1519
```bash
1620
php artisan vendor:publish --tag=laravel-wallet-migrations
1721
```
1822

19-
## Configuration
23+
### Configuration
2024
You can publish the config file with this artisan command:
2125
```bash
2226
php artisan vendor:publish --tag=laravel-wallet-config

docs/recalculate.md renamed to docs/refresh.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# To recalculate the balance
1+
# To refresh the balance
22

33
There are situations when you create a lot of unconfirmed operations,
44
and then abruptly confirm everything.
55
In this case, the user's balance will not change.
6-
You must be forced to recalculate the balance.
6+
You must be forced to refresh the balance.
77

88
---
99

@@ -42,11 +42,11 @@ where confirmed=0 and
4242
-- 212 rows affected in 54 ms
4343
```
4444

45-
Recalculate the balance.
45+
Refresh the balance.
4646

4747
```php
4848
$user->balance; // int(27)
49-
$user->wallet->calculateBalance();
49+
$user->wallet->refreshBalance();
5050
$user->balance; // int(42)
5151
```
5252

docs/requirements.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ The following versions of Laravel are supported:
1111
- Laravel 5.5
1212
- Laravel 5.6
1313
- Laravel 5.7
14+
- Laravel 5.8

docs/ru/_sidebar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- [Депозит](deposit)
1212
- [Вывод](withdraw)
1313
- [Перевод](transfer)
14-
- [Пересчёт баланса](recalculate)
14+
- [Пересчёт баланса](refresh)
1515

1616
- Покупки
1717

File renamed without changes.

docs/ru/requirements.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
- Laravel 5.5
1212
- Laravel 5.6
1313
- Laravel 5.7
14+
- Laravel 5.8

docs/upgrade-guide.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,58 @@
44

55
Replace `::with('balance')` to `::with('wallet')`
66

7+
---
8+
79
## 2.1.x → 2.2.x
810

911
Replace `CanBePaid` to `CanPay`.
1012

1113
Replace `CanBePaidFloat` to `CanPayFloat`.
14+
15+
---
16+
17+
## 2.2.x → 2.4.x
18+
19+
Replace `calculateBalance` to `refreshBalance`
20+
21+
---
22+
23+
## 2.4.x → 3.0.x
24+
25+
Replace path `bavix.wallet::transaction` to `Bavix\Wallet\Models\Transaction::class`
26+
27+
Replace path `bavix.wallet::transfer` to `Bavix\Wallet\Models\Transfer::class`
28+
29+
Replace path `bavix.wallet::wallet` to `Bavix\Wallet\Models\Wallet::class`
30+
31+
```php
32+
// old
33+
app('bavix.wallet::transaction');
34+
// new
35+
app(Bavix\Wallet\Models\Transaction::class);
36+
```
37+
38+
Add the `$quantity` parameter to the `canBuy` method.
39+
40+
```php
41+
// old
42+
public function canBuy(Customer $customer, bool $force = false): bool
43+
// new
44+
public function canBuy(Customer $customer, int $quantity = 1, bool $force = null): bool
45+
```
46+
47+
Add method `getUniqueId` to Interface `Product`
48+
49+
```php
50+
class Item extends Model implements Product
51+
{
52+
53+
// Your method
54+
55+
public function getUniqueId(): string
56+
{
57+
return (string)$this->getKey();
58+
}
59+
60+
}
61+
```

0 commit comments

Comments
 (0)