Skip to content

Instantly share code, notes, and snippets.

@akmalhazim
Created May 19, 2019 01:02
Show Gist options
  • Save akmalhazim/c76090383a637fd33df6fc3b75642c60 to your computer and use it in GitHub Desktop.
Save akmalhazim/c76090383a637fd33df6fc3b75642c60 to your computer and use it in GitHub Desktop.
<?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