-
-
Save maciejmiara/04138fa70111927e2c5884dbcdd7c568 to your computer and use it in GitHub Desktop.
Laravel provider for dependency injection
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 Domain\Repository\RunnerRepository; | |
use Domain\Repository\RunParticipationRepository; | |
use Domain\Repository\RunRepository; | |
use Domain\Repository\RunResultRepository; | |
use Illuminate\Support\ServiceProvider; | |
class RunnerProvider extends ServiceProvider | |
{ | |
public $bindings = [ | |
RunnerRepository::class => \Infrastructure\Eloquent\Repository\RunnerRepository::class, | |
RunRepository::class => \Infrastructure\Eloquent\Repository\RunRepository::class, | |
RunParticipationRepository::class => \Infrastructure\Eloquent\Repository\RunParticipationRepository::class, | |
RunResultRepository::class => \Infrastructure\Eloquent\Repository\RunResultRepository::class, | |
]; | |
/** | |
* Register services. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
// | |
} | |
/** | |
* Bootstrap services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
// | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment