You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ Though this package is crafted to suit most of your needs by default, you can ed
4
4
## Configure default wallet
5
5
Customize `name`,`slug` and `meta` of default wallet.
6
6
7
-
```php[config/wallet.php]
7
+
config/wallet.php:
8
+
```php
8
9
'default' => [
9
10
'name' => 'Ethereum',
10
11
'slug' => 'ETH',
@@ -15,7 +16,8 @@ Customize `name`,`slug` and `meta` of default wallet.
15
16
You can extend base Wallet model by creating a new class that extends `Bavix\Wallet\Models\Wallet` and registering the new class in `config/wallet.php`.
16
17
Example `MyWallet.php`
17
18
18
-
```php[App/Models/MyWallet.php]
19
+
App/Models/MyWallet.php:
20
+
```php
19
21
use Bavix\Wallet\Models\Wallet as WalletBase;
20
22
21
23
class MyWallet extends WalletBase {
@@ -24,7 +26,8 @@ class MyWallet extends WalletBase {
24
26
```
25
27
### Register base Wallet model
26
28
27
-
```php[config/wallet.php]
29
+
config/wallet.php:
30
+
```php
28
31
'wallet' => [
29
32
'table' => 'wallets',
30
33
'model' => MyWallet::class,
@@ -44,7 +47,8 @@ This same method above, can be used to extend the base `Transfer` and `Transacti
44
47
45
48
You can change the default wallet decimal places, in wallet config file. This can be useful when working with fractional numbers.
0 commit comments