init commit

This commit is contained in:
David Melendez
2026-01-14 22:38:44 +01:00
parent 4e0c415f0b
commit e25d53d054
124 changed files with 21653 additions and 1 deletions

View File

@@ -0,0 +1,63 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
// Interfaces
use App\Interfaces\UserRepositoryInterface;
use App\Interfaces\ResumeRepositoryInterface;
// Repositories
use App\Repositories\UserRepository;
use App\Repositories\ResumeRepository;
// Models
use App\Models\User;
use App\Models\Resume;
/**
* Repository Service Provider
*
* Binds repository interfaces to their concrete implementations.
* Enables dependency injection throughout the application.
*
* @author David Valera Melendez <david@valera-melendez.de>
* @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
{
//
}
}