1
0
mirror of https://koodu.h-i.works/projects/thebadspace synced 2025-06-25 16:04:37 -05:00

Added Source Repository Class

Created a class to handle source data and methodology, and to offload
actions from service classes to make them easier to manage
This commit is contained in:
ro
2024-02-19 13:30:00 -06:00
parent 3edd6e5521
commit f96707f256
4 changed files with 117 additions and 94 deletions

View File

@ -4,9 +4,11 @@ namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Repositories\LocationRepository;
use App\Repositories\SourceRepository;
use App\Services\UpdateService;
use App\Services\MaintenanceService;
use App\Models\Location;
use App\Models\Source;
class AppServiceProvider extends ServiceProvider
{
@ -19,8 +21,15 @@ class AppServiceProvider extends ServiceProvider
return new LocationRepository(new Location());
});
$this->app->bind(SourceRepository::class, function ($app) {
return new SourceRepository(new Source());
});
$this->app->bind(UpdateService::class, function ($app) {
return new UpdateService(new LocationRepository(new Location()));
return new UpdateService(
new LocationRepository(new Location()),
new SourceRepository(new Source())
);
});
$this->app->bind(MaintenanceService::class, function ($app) {