Immobilien site 11-05-2026

This commit is contained in:
Kevin Adametz 2026-05-11 10:29:37 +02:00
parent e198d842ce
commit 6799325f71
28 changed files with 16189 additions and 809 deletions

View file

@ -86,6 +86,14 @@ if (! function_exists('theme_image_url')) {
return $trimmed;
}
if (str_starts_with($trimmed, 'storage/')) {
return asset($trimmed);
}
if (str_starts_with($trimmed, 'immobile/')) {
return asset('storage/'.$trimmed);
}
$candidates = array_values(array_unique(array_filter([$trimmed, basename($trimmed)])));
foreach ($candidates as $candidate) {
if (CmsMedia::query()->where('filename', $candidate)->exists()) {