implement post and comment controllers

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.
This commit is contained in:
Yisroel Baum 2026-05-06 22:26:35 +03:00
parent 8614858558
commit 59d4ed88c4
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
4 changed files with 342 additions and 0 deletions

View file

@ -4,6 +4,8 @@ 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;
@ -32,5 +34,9 @@ class RepositoryServiceProvider extends ServiceProvider
PostRepository::class,
EloquentPostRepository::class,
);
$this->app->bind(
CommentRepository::class,
EloquentCommentRepository::class,
);
}
}