axotion /
laravel-dotpay
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Evilnet\Dotpay; |
||
| 4 | |||
| 5 | use Evilnet\Dotpay\DotpayApi\DotpayApi; |
||
| 6 | use Illuminate\Support\ServiceProvider; |
||
| 7 | |||
| 8 | class DotpayServiceProvider extends ServiceProvider |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Perform post-registration booting of services. |
||
| 12 | * |
||
| 13 | * @return void |
||
| 14 | */ |
||
| 15 | public function boot() |
||
| 16 | { |
||
| 17 | $this->publishes([ |
||
| 18 | __DIR__.'/config/dotpay.php' => config_path('dotpay.php'), |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 19 | ]); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Register any package services. |
||
| 24 | * |
||
| 25 | * @return void |
||
| 26 | */ |
||
| 27 | public function register() |
||
| 28 | { |
||
| 29 | $this->app->singleton(DotpayApi::class, function ($app) { |
||
| 30 | return new DotpayApi($app['config']['dotpay']['api']); |
||
| 31 | }); |
||
| 32 | |||
| 33 | $this->app->bind('dotpay', function($app) { |
||
| 34 | return new DotpayManager($app[DotpayApi::class]); |
||
| 35 | }); |
||
| 36 | } |
||
| 37 | } |