Build Laravel 13 ticket assistant with Docker, Livewire admin, and helpdesk scraper command

This commit is contained in:
SitiWeb
2026-04-29 13:11:39 +02:00
parent 141a1a3c9b
commit 3c4572bb12
58 changed files with 9377 additions and 455 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace App\DTOs;
use App\Models\Article;
class ArticleCandidateDTO
{
public function __construct(
public readonly int $articleId,
public readonly string $title,
public readonly string $content,
public readonly float $distance
) {}
public static function fromArticle(Article $article, float $distance): self
{
return new self(
articleId: $article->id,
title: $article->title,
content: $article->content,
distance: $distance
);
}
public function toArray(): array
{
return [
'article_id' => $this->articleId,
'title' => $this->title,
'content' => $this->content,
'distance' => $this->distance,
];
}
}