ForRo/app/Providers/AppServiceProvider.php
ro da0ddb3ef0 Plugged in repository class for location data
Seperated data logic for locations and put it into its own repository
class for better organization and readability of controller classes.

Data methods are still simple so no need for an interface class just
yet, but will probably implement at a later date
2024-02-09 14:53:08 -06:00

29 lines
557 B
PHP

<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Repositories\LocationRepository;
use App\Models\Location;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
$this->app->bind(LocationRepository::class, function ($app) {
return new LocationRepository(new Location());
});
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
}
}