56 lines
2.1 KiB
PHP
56 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
// Repository interface to implementation bindings
|
|
$this->app->bind(\App\Repositories\ClientRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\ClientRepository($app->make(\App\Models\Client::class));
|
|
});
|
|
|
|
$this->app->bind(\App\Repositories\ClientGroupRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\ClientGroupRepository($app->make(\App\Models\ClientGroup::class));
|
|
});
|
|
|
|
$this->app->bind(\App\Repositories\ClientContactRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\ClientContactRepository($app->make(\App\Models\ClientContact::class));
|
|
});
|
|
|
|
$this->app->bind(\App\Repositories\ContactRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\ContactRepository($app->make(\App\Models\Contact::class));
|
|
});
|
|
|
|
$this->app->bind(\App\Repositories\ClientLocationRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\ClientLocationRepository($app->make(\App\Models\ClientLocation::class));
|
|
});
|
|
|
|
$this->app->bind(\App\Repositories\FournisseurRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\FournisseurRepository($app->make(\App\Models\Fournisseur::class));
|
|
});
|
|
|
|
$this->app->bind(\App\Repositories\ProductRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\ProductRepository($app->make(\App\Models\Product::class));
|
|
});
|
|
|
|
$this->app->bind(\App\Repositories\ProductCategoryRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\ProductCategoryRepository($app->make(\App\Models\ProductCategory::class));
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
//
|
|
}
|
|
}
|