Piso {{ $departamento->piso_desde }}
{{ $departamento->unidades }} UNIDADES
{{ $departamento->metros_cuadrados }} m²
AMENIDADES
{{-- @dd($departamento->amenidades) --}}
@foreach ($departamento->amenidades as $amenidad)
@php
$icon = $amenidad['icon'];
$pathLocal = resource_path("svg/local/{$icon}.svg");
$pathEspacios = resource_path("svg/espacios/{$icon}.svg");
$svg = null;
if (file_exists($pathLocal)) {
$svg = file_get_contents($pathLocal);
} elseif (file_exists($pathEspacios)) {
$svg = file_get_contents($pathEspacios);
}
if ($svg) {
// Forzar que el color sea controlado por CSS
$svg = preg_replace(
'/fill="[^"]*"/',
'fill="currentColor"',
$svg
);
// Inyectar clases Tailwind al
@endforeach