Added Feedback section.

This commit is contained in:
2024-04-23 19:30:56 +05:00
parent 491249c8d8
commit 8c353a49b7
44 changed files with 1050 additions and 0 deletions
@@ -0,0 +1,15 @@
<?php declare(strict_types=1);
namespace App\Services\ProjectFeedback;
use App\Dto\Builder\ProjectFeedback as ProjectFeedbackBuilderDto;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\Relation;
final readonly class BuilderCommand
{
public function execute(Relation | Builder $query, ProjectFeedbackBuilderDto $projectFeedbackBuilderDto): Relation | Builder
{
return $query;
}
}
@@ -0,0 +1,15 @@
<?php declare(strict_types=1);
namespace App\Services\ProjectFeedback;
use App\Models\Project;
use App\Models\ProjectFeedback;
final readonly class ProjectFeedbackCommandHandler
{
public function handleStore(Project $project, array $data): ProjectFeedback
{
$feedback = $project->feedbacks()->create($data);
return $feedback;
}
}