|
1 | 1 | <?php |
2 | 2 |
|
| 3 | +use Bavix\Wallet\Services\ExchangeService; |
| 4 | +use Bavix\Wallet\Services\CommonService; |
| 5 | +use Bavix\Wallet\Services\ProxyService; |
| 6 | +use Bavix\Wallet\Services\WalletService; |
| 7 | +use Bavix\Wallet\Models\Transaction; |
| 8 | +use Bavix\Wallet\Models\Transfer; |
| 9 | +use Bavix\Wallet\Models\Wallet; |
| 10 | +use Bavix\Wallet\Simple\Rate; |
| 11 | + |
3 | 12 | return [ |
| 13 | + /** |
| 14 | + * The parameter is used for fast packet overload. |
| 15 | + * You do not need to search for the desired class by code, the library will do it itself. |
| 16 | + */ |
4 | 17 | 'package' => [ |
5 | | - 'rateable' => \Bavix\Wallet\Simple\Rate::class, |
| 18 | + 'rateable' => Rate::class, |
6 | 19 | ], |
| 20 | + |
| 21 | + /** |
| 22 | + * Sometimes a slug may not match the currency and you need the ability to add an exception. |
| 23 | + * The main thing is that there are not many exceptions) |
| 24 | + * |
| 25 | + * Syntax: |
| 26 | + * 'slug' => 'currency' |
| 27 | + * |
| 28 | + * @example |
| 29 | + * 'my-usd' => 'USD' |
| 30 | + */ |
| 31 | + 'currencies' => [], |
| 32 | + |
| 33 | + /** |
| 34 | + * Services are the main core of the library and sometimes they need to be improved. |
| 35 | + * This configuration will help you to quickly customize the library. |
| 36 | + */ |
7 | 37 | 'services' => [ |
8 | | - 'exchange' => \Bavix\Wallet\Services\ExchangeService::class, |
9 | | - 'common' => \Bavix\Wallet\Services\CommonService::class, |
10 | | - 'proxy' => \Bavix\Wallet\Services\ProxyService::class, |
11 | | - 'wallet' => \Bavix\Wallet\Services\WalletService::class, |
| 38 | + 'exchange' => ExchangeService::class, |
| 39 | + 'common' => CommonService::class, |
| 40 | + 'proxy' => ProxyService::class, |
| 41 | + 'wallet' => WalletService::class, |
12 | 42 | ], |
| 43 | + |
| 44 | + /** |
| 45 | + * Transaction model configuration. |
| 46 | + */ |
13 | 47 | 'transaction' => [ |
14 | 48 | 'table' => 'transactions', |
15 | | - 'model' => \Bavix\Wallet\Models\Transaction::class, |
| 49 | + 'model' => Transaction::class, |
16 | 50 | ], |
| 51 | + |
| 52 | + /** |
| 53 | + * Transfer model configuration. |
| 54 | + */ |
17 | 55 | 'transfer' => [ |
18 | 56 | 'table' => 'transfers', |
19 | | - 'model' => \Bavix\Wallet\Models\Transfer::class, |
| 57 | + 'model' => Transfer::class, |
20 | 58 | ], |
| 59 | + |
| 60 | + /** |
| 61 | + * Wallet model configuration. |
| 62 | + */ |
21 | 63 | 'wallet' => [ |
22 | 64 | 'table' => 'wallets', |
23 | | - 'model' => \Bavix\Wallet\Models\Wallet::class, |
| 65 | + 'model' => Wallet::class, |
24 | 66 | 'default' => [ |
25 | 67 | 'name' => 'Default Wallet', |
26 | 68 | 'slug' => 'default', |
|
0 commit comments