route element file uploads

Add short and long PDF paths to elements, keep pdfPath as a short PDF compatibility alias, and route generic file uploads by fileType.
This commit is contained in:
Yisroel Baum 2026-06-14 23:17:56 +03:00
parent 0d5783ba9c
commit 9bbabc7fa6
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
28 changed files with 686 additions and 214 deletions

View file

@ -12,7 +12,8 @@ use Illuminate\Database\Eloquent\Model;
* @property string $description
* @property string|null $icon_image_url
* @property string $rich_text
* @property string|null $pdf_path
* @property string|null $short_pdf_path
* @property string|null $long_pdf_path
* @property string|null $youtube_url
* @property int|null $parent_element_id
*
@ -26,7 +27,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static Builder<static>|ElementModel whereDescription($value)
* @method static Builder<static>|ElementModel whereIconImageUrl($value)
* @method static Builder<static>|ElementModel whereRichText($value)
* @method static Builder<static>|ElementModel wherePdfPath($value)
* @method static Builder<static>|ElementModel whereShortPdfPath($value)
* @method static Builder<static>|ElementModel whereLongPdfPath($value)
* @method static Builder<static>|ElementModel whereYoutubeUrl($value)
*
* @mixin \Eloquent
@ -43,7 +45,8 @@ class ElementModel extends Model
'description',
'icon_image_url',
'rich_text',
'pdf_path',
'short_pdf_path',
'long_pdf_path',
'youtube_url',
'parent_element_id',
];