Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class LaravelGoldenpayServiceProvider extends ServiceProvider |
||
11 | { |
||
12 | /** |
||
13 | * Bootstrap the application services. |
||
14 | */ |
||
15 | public function boot() |
||
16 | { |
||
17 | $this->app->bind(PaymentInterface::class, Library::class); |
||
18 | |||
19 | if ($this->app->runningInConsole()) { |
||
20 | $this->publishes([ |
||
21 | __DIR__ . '/../config/config.php' => config_path('goldenpay.php'), |
||
22 | ], 'config'); |
||
23 | |||
24 | if (! class_exists('CreateGoldenpayPaymentsTable')) { |
||
25 | $this->publishes([ |
||
26 | __DIR__ . '/../database/migrations/goldenpay_payments_table.php.stub' => database_path('migrations/' . date('Y_m_d_His') . '_create_goldenpay_payments_table.php'), |
||
27 | ], 'migrations'); |
||
28 | } |
||
29 | |||
30 | $this->commands([ |
||
31 | ResultCommand::class, |
||
32 | ]); |
||
33 | } |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Register the application services. |
||
38 | */ |
||
39 | public function register() |
||
45 | }); |
||
46 | } |
||
48 |