feat(tenant): add social media functionality with validation, synchronization, and tests

This commit is contained in:
2026-07-23 15:03:57 -03:00
parent c66d2019d6
commit 25891cefbc
7 changed files with 178 additions and 7 deletions

View File

@@ -44,6 +44,17 @@ class TenantResource extends JsonResource
->map(fn ($attachment) => $attachment->getTemporaryUrl(1440))
->values()
),
'social_media' => $this->whenLoaded(
'socialMedia',
fn () => $this->socialMedia
->map(fn ($socialMedia) => [
'code' => $socialMedia->code,
'icon' => $socialMedia->icon,
'name' => $socialMedia->name,
'url' => $socialMedia->pivot->url,
])
->values()
),
'menues' => $this->whenLoaded('menues'),
];
}