add element icons

This commit is contained in:
Yisroel Baum 2026-05-27 21:14:24 +03:00
parent ac7af2463d
commit f3f500d491
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
12 changed files with 49 additions and 0 deletions

View file

@ -31,6 +31,9 @@ class CreateElement
throw new BadRequestException('title is required');
}
$description = $request->description ?? '';
$iconImageUrl = $request->iconImageUrl === ''
? null
: $request->iconImageUrl;
$richText = $request->richText ?? '';
$pdfPath = $request->pdfPath === '' ? null : $request->pdfPath;
$youtubeUrl = $request->youtubeUrl === ''
@ -51,6 +54,7 @@ class CreateElement
set: $set,
title: $request->title,
description: $description,
iconImageUrl: $iconImageUrl,
richText: $richText,
pdfPath: $pdfPath,
youtubeUrl: $youtubeUrl,
@ -76,6 +80,7 @@ class CreateElement
set: $set,
title: $request->title,
description: $description,
iconImageUrl: $iconImageUrl,
richText: $richText,
pdfPath: $pdfPath,
youtubeUrl: $youtubeUrl,

View file

@ -8,6 +8,7 @@ class CreateElementRequest
public ?int $setId,
public ?string $title,
public ?string $description,
public ?string $iconImageUrl,
public ?string $richText,
public ?string $pdfPath,
public ?string $youtubeUrl,