2023-08-14 21:07:53 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
2024-02-09 21:53:08 +01:00
|
|
|
use App\Repositories\LocationRepository;
|
2024-02-19 20:30:00 +01:00
|
|
|
use App\Repositories\SourceRepository;
|
2024-02-15 22:00:03 +01:00
|
|
|
use App\Services\UpdateService;
|
|
|
|
use App\Services\MaintenanceService;
|
2024-02-09 21:53:08 +01:00
|
|
|
use App\Models\Location;
|
2024-02-19 20:30:00 +01:00
|
|
|
use App\Models\Source;
|
2023-08-14 21:07:53 +02:00
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Register any application services.
|
|
|
|
*/
|
|
|
|
public function register(): void
|
|
|
|
{
|
2024-02-09 21:53:08 +01:00
|
|
|
$this->app->bind(LocationRepository::class, function ($app) {
|
|
|
|
return new LocationRepository(new Location());
|
|
|
|
});
|
2024-02-15 22:00:03 +01:00
|
|
|
|
2024-02-19 20:30:00 +01:00
|
|
|
$this->app->bind(SourceRepository::class, function ($app) {
|
|
|
|
return new SourceRepository(new Source());
|
|
|
|
});
|
|
|
|
|
2024-02-15 22:00:03 +01:00
|
|
|
$this->app->bind(UpdateService::class, function ($app) {
|
2024-02-19 20:30:00 +01:00
|
|
|
return new UpdateService(
|
|
|
|
new LocationRepository(new Location()),
|
|
|
|
new SourceRepository(new Source())
|
|
|
|
);
|
2024-02-15 22:00:03 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
$this->app->bind(MaintenanceService::class, function ($app) {
|
|
|
|
return new MaintenanceService(new Location());
|
|
|
|
});
|
2024-02-20 19:57:33 +01:00
|
|
|
|
|
|
|
$this->app->bind(PaginationService::class, function ($app) {
|
|
|
|
return new PaginationService(new Location());
|
|
|
|
});
|
2023-08-14 21:07:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*/
|
|
|
|
public function boot(): void
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|