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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user