* @since February 2025 */ class RepositoryServiceProvider extends ServiceProvider { /** * All of the container bindings that should be registered. * * @var array */ public array $bindings = [ UserRepositoryInterface::class => UserRepository::class, ResumeRepositoryInterface::class => ResumeRepository::class, ]; /** * Register services. */ public function register(): void { // Bind User Repository $this->app->bind(UserRepositoryInterface::class, function ($app) { return new UserRepository(new User()); }); // Bind Resume Repository $this->app->bind(ResumeRepositoryInterface::class, function ($app) { return new ResumeRepository(new Resume()); }); } /** * Bootstrap services. */ public function boot(): void { // } }