Created
May 19, 2019 01:02
-
-
Save akmalhazim/c76090383a637fd33df6fc3b75642c60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use App\Modules\AccountModule; | |
use App\Modules\SubscriptionModule; | |
use App\Modules\BillingModule; | |
use App\Modules\ProjectModule; | |
use App\Modules\RecordModule; | |
use App\Modules\SensorModule; | |
use App\Contracts\PaymentGateway; | |
use App\Services\BraintreeService; | |
use Illuminate\Support\ServiceProvider; | |
class InternalServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Register any application services. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
$this->app->bind(\App\Contracts\PaymentGateway::class, \App\Services\BraintreeService::class); | |
} | |
/** | |
* Boot the authentication services for the application. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
$this->app->bind('AccountModule', function($app) { | |
return new AccountModule; | |
}); | |
$this->app->bind('SubscriptionModule', function($app) { | |
return new SubscriptionModule; | |
}); | |
$this->app->bind('BillingModule', function($app) { | |
return new BillingModule; | |
}); | |
$this->app->bind('ProjectModule', function($app) { | |
return new ProjectModule; | |
}); | |
$this->app->bind('RecordModule', function($app) { | |
return new RecordModule; | |
}); | |
$this->app->bind('SensorModule', function($app) { | |
return new SensorModule; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment