77 lines
3.4 KiB
PHP
77 lines
3.4 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));
|
|
});
|
|
|
|
// Employee management repository bindings
|
|
$this->app->bind(\App\Repositories\EmployeeRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\EmployeeRepository($app->make(\App\Models\Employee::class));
|
|
});
|
|
|
|
$this->app->bind(\App\Repositories\ThanatopractitionerRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\ThanatopractitionerRepository($app->make(\App\Models\Thanatopractitioner::class));
|
|
});
|
|
|
|
$this->app->bind(\App\Repositories\PractitionerDocumentRepositoryInterface::class, function ($app) {
|
|
return new \App\Repositories\PractitionerDocumentRepository($app->make(\App\Models\PractitionerDocument::class));
|
|
});
|
|
|
|
$this->app->bind(\App\Repositories\InterventionRepositoryInterface::class, \App\Repositories\InterventionRepository::class);
|
|
|
|
$this->app->bind(\App\Repositories\DeceasedRepositoryInterface::class, \App\Repositories\DeceasedRepository::class);
|
|
|
|
$this->app->bind(\App\Repositories\InterventionPractitionerRepositoryInterface::class, \App\Repositories\InterventionPractitionerRepository::class);
|
|
|
|
$this->app->bind(\App\Repositories\FileRepositoryInterface::class, \App\Repositories\FileRepository::class);
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
//
|
|
}
|
|
}
|