Skip to content

Instantly share code, notes, and snippets.

@maxca
Created October 25, 2016 06:49
Show Gist options
  • Select an option

  • Save maxca/b1284c86854cc7bb0a31fa7f5bfc7b08 to your computer and use it in GitHub Desktop.

Select an option

Save maxca/b1284c86854cc7bb0a31fa7f5bfc7b08 to your computer and use it in GitHub Desktop.
<?php namespace App\Providers;
use App\Repositories\Storage\serviceCall3rdRepository;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
}
public function register()
{
$this->app->bind('App\Repositories\Interfaces\servicePackageInterface', function () {
$serviceCall3rdRepository = $this->app->make(serviceCall3rdRepository::class);
return new \App\Repositories\Storage\servicePackageRepository($serviceCall3rdRepository, \Request::segment(2));
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment