|
18 | 18 | use Bavix\Wallet\Services\LockService; |
19 | 19 | use Bavix\Wallet\Services\ProxyService; |
20 | 20 | use Bavix\Wallet\Services\WalletService; |
| 21 | +use Bavix\Wallet\Simple\Rate; |
| 22 | +use Bavix\Wallet\Simple\Store; |
21 | 23 | use Illuminate\Support\ServiceProvider; |
22 | 24 | use function config; |
23 | 25 | use function dirname; |
@@ -83,25 +85,25 @@ public function register(): void |
83 | 85 | ); |
84 | 86 |
|
85 | 87 | // Bind eloquent models to IoC container |
86 | | - $this->app->singleton(Rateable::class, config('wallet.package.rateable')); |
87 | | - $this->app->singleton(Storable::class, config('wallet.package.storable')); |
88 | | - $this->app->singleton(DbService::class, config('wallet.services.db')); |
89 | | - $this->app->singleton(ExchangeService::class, config('wallet.services.exchange')); |
90 | | - $this->app->singleton(CommonService::class, config('wallet.services.common')); |
91 | | - $this->app->singleton(ProxyService::class, config('wallet.services.proxy')); |
92 | | - $this->app->singleton(WalletService::class, config('wallet.services.wallet')); |
93 | | - $this->app->singleton(LockService::class, config('wallet.services.lock')); |
| 88 | + $this->app->singleton(Rateable::class, config('wallet.package.rateable', Rate::class)); |
| 89 | + $this->app->singleton(Storable::class, config('wallet.package.storable', Store::class)); |
| 90 | + $this->app->singleton(DbService::class, config('wallet.services.db', DbService::class)); |
| 91 | + $this->app->singleton(ExchangeService::class, config('wallet.services.exchange', ExchangeService::class)); |
| 92 | + $this->app->singleton(CommonService::class, config('wallet.services.common', CommonService::class)); |
| 93 | + $this->app->singleton(ProxyService::class, config('wallet.services.proxy', ProxyService::class)); |
| 94 | + $this->app->singleton(WalletService::class, config('wallet.services.wallet', WalletService::class)); |
| 95 | + $this->app->singleton(LockService::class, config('wallet.services.lock', LockService::class)); |
94 | 96 |
|
95 | 97 | // models |
96 | | - $this->app->bind(Transaction::class, config('wallet.transaction.model')); |
97 | | - $this->app->bind(Transfer::class, config('wallet.transfer.model')); |
98 | | - $this->app->bind(Wallet::class, config('wallet.wallet.model')); |
| 98 | + $this->app->bind(Transaction::class, config('wallet.transaction.model', Transaction::class)); |
| 99 | + $this->app->bind(Transfer::class, config('wallet.transfer.model', Transfer::class)); |
| 100 | + $this->app->bind(Wallet::class, config('wallet.wallet.model', Wallet::class)); |
99 | 101 |
|
100 | 102 | // object's |
101 | | - $this->app->bind(Bring::class, config('wallet.objects.bring')); |
102 | | - $this->app->bind(Cart::class, config('wallet.objects.cart')); |
103 | | - $this->app->bind(EmptyLock::class, config('wallet.objects.emptyLock')); |
104 | | - $this->app->bind(Operation::class, config('wallet.objects.operation')); |
| 103 | + $this->app->bind(Bring::class, config('wallet.objects.bring', Bring::class)); |
| 104 | + $this->app->bind(Cart::class, config('wallet.objects.cart', Cart::class)); |
| 105 | + $this->app->bind(EmptyLock::class, config('wallet.objects.emptyLock', EmptyLock::class)); |
| 106 | + $this->app->bind(Operation::class, config('wallet.objects.operation', Operation::class)); |
105 | 107 | } |
106 | 108 |
|
107 | 109 | } |
0 commit comments