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-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;
|
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
|
|
|
|
|
|
|
$this->app->bind(UpdateService::class, function ($app) {
|
2024-02-16 22:34:09 +01:00
|
|
|
return new UpdateService(new LocationRepository(new Location()));
|
2024-02-15 22:00:03 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
$this->app->bind(MaintenanceService::class, function ($app) {
|
|
|
|
return new MaintenanceService(new Location());
|
|
|
|
});
|
2023-08-14 21:07:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*/
|
|
|
|
public function boot(): void
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|