Skip to content

Commit 7b11c9e

Browse files
committed
configuration.md
1 parent 8508174 commit 7b11c9e

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

config/config.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* 'scale' - length of the mantissa
6161
*/
6262
'math' => [
63-
'scale' => 64,
63+
'scale' => env('WALLET_MATH_SCALE', 64),
6464
],
6565

6666
/**
@@ -166,28 +166,28 @@
166166
* Base model 'transaction'.
167167
*/
168168
'transaction' => [
169-
'table' => 'transactions',
169+
'table' => env('WALLET_TRANSACTION_TABLE_NAME', 'transactions'),
170170
'model' => Transaction::class,
171171
],
172172

173173
/**
174174
* Base model 'transfer'.
175175
*/
176176
'transfer' => [
177-
'table' => 'transfers',
177+
'table' => env('WALLET_TRANSFER_TABLE_NAME', 'transfers'),
178178
'model' => Transfer::class,
179179
],
180180

181181
/**
182182
* Base model 'wallet'.
183183
*/
184184
'wallet' => [
185-
'table' => 'wallets',
185+
'table' => env('WALLET_WALLET_TABLE_NAME', 'wallets'),
186186
'model' => Wallet::class,
187187
'creating' => [],
188188
'default' => [
189-
'name' => 'Default Wallet',
190-
'slug' => 'default',
189+
'name' => env('WALLET_DEFAULT_WALLET_NAME', 'Default Wallet'),
190+
'slug' => env('WALLET_DEFAULT_WALLET_SLUG', 'default'),
191191
'meta' => [],
192192
],
193193
],

docs/configuration.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
# Configuration
2+
3+
## Environment
4+
5+
| Name | Description | Default |
6+
|---------------------------------|-------------------------------|----------------|
7+
| `WALLET_MATH_SCALE` | Select mathematical precision | 64 |
8+
| `WALLET_CACHE_DRIVER` | Cache for wallet balance | array |
9+
| `WALLET_CACHE_TTL` | Cache TTL for wallet balance | 24h |
10+
| `WALLET_LOCK_DRIVER` | Lock for wallets | array |
11+
| `WALLET_LOCK_TTL` | Lock TTL for wallets | 1s |
12+
| `WALLET_TRANSACTION_TABLE_NAME` | Transaction table name | transactions |
13+
| `WALLET_TRANSFER_TABLE_NAME` | Transfer table name | transfers |
14+
| `WALLET_WALLET_TABLE_NAME` | Wallet table name | wallets |
15+
| `WALLET_DEFAULT_WALLET_NAME` | Default wallet name | Default Wallet |
16+
| `WALLET_DEFAULT_WALLET_SLUG` | Default wallet slug | default |
17+
218
Though this package is crafted to suit most of your needs by default, you can edit the configuration file to suit certain demands.
319

420
## Configure default wallet

0 commit comments

Comments
 (0)