feat: legal sections

This commit is contained in:
2026-05-24 13:20:04 +02:00
parent 3a74c2c34d
commit 8b162c8e4c
24 changed files with 1145 additions and 0 deletions
@@ -0,0 +1,28 @@
<?php
namespace App\Http\Resources;
use App\Models\LegalDocument;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
/** @mixin LegalDocument */
class LegalDocumentResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'slug' => $this->slug,
'type' => $this->type?->value,
'typeLabel' => $this->type?->getLabel(),
'version' => $this->version,
'title' => $this->title,
'content' => $this->content,
'isActive' => $this->is_active,
'publishedAt' => $this->published_at,
'createdAt' => $this->created_at,
'updatedAt' => $this->updated_at,
];
}
}