Files
laraundfelix/app/Domain/Media/ThumbnailRef.php
T
LarsandCursor 8e77defaca
Deploy Test / test (push) Successful in 28s
Deploy Test / deploy (push) Successful in 39s
Wähle das Vorschaubild am Medium und nutze es als Standard in der Anzeige und in Modulen.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-16 21:34:11 +01:00

16 lines
369 B
PHP

<?php
namespace App\Domain\Media;
class ThumbnailRef
{
public static function url(string $route, string $kind, int $id, mixed $path): ?string
{
if (! is_string($path) || ! str_starts_with($path, 'vorschau/') || str_contains($path, '..')) {
return null;
}
return route($route, ['kind' => $kind, 'subject' => $id]);
}
}