Wires PostController (recent, show, create, delete, listByUser) and CommentController (listForPost, create, delete) to the existing use cases. Posts and comments expose author display names alongside user IDs. CommentRepository binding added to RepositoryServiceProvider.
42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Auth\EloquentSessionRepository;
|
|
use App\Auth\SessionRepository;
|
|
use App\Comment\CommentRepository;
|
|
use App\Comment\EloquentCommentRepository;
|
|
use App\Email\EmailConfirmationToken\EloquentEmailConfirmationTokenRepository;
|
|
use App\Email\EmailConfirmationToken\EmailConfirmationTokenRepository;
|
|
use App\Post\EloquentPostRepository;
|
|
use App\Post\PostRepository;
|
|
use App\User\EloquentUserRepository;
|
|
use App\User\UserRepository;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class RepositoryServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
$this->app->bind(
|
|
UserRepository::class,
|
|
EloquentUserRepository::class,
|
|
);
|
|
$this->app->bind(
|
|
SessionRepository::class,
|
|
EloquentSessionRepository::class,
|
|
);
|
|
$this->app->bind(
|
|
EmailConfirmationTokenRepository::class,
|
|
EloquentEmailConfirmationTokenRepository::class,
|
|
);
|
|
$this->app->bind(
|
|
PostRepository::class,
|
|
EloquentPostRepository::class,
|
|
);
|
|
$this->app->bind(
|
|
CommentRepository::class,
|
|
EloquentCommentRepository::class,
|
|
);
|
|
}
|
|
}
|