@extends('layouts.app') @section('content') @php function arrayToRangeString($array) { if (empty($array)) { return ''; } // Ordenar el array sort($array); $result = []; $start = $array[0]; $end = $start; for ($i = 1; $i <= count($array); $i++) { if (isset($array[$i]) && $array[$i] == $end + 1) { $end = $array[$i]; } else { if ($start == $end) { $result[] = "$start"; } else { $result[] = "$start-$end"; } if (isset($array[$i])) { $start = $array[$i]; $end = $start; } } } return implode(', ', $result); } @endphp

{{ __('customer.floorplan.title.print') }}: {{ $floorplan->customer->name }}

@foreach ($legend['data'] as $data) @endforeach
Color Nombre Código Cantidad Rangos
{{ $data['label'] }} {{ $data['code'] }} {{ $data['count'] }} {{ arrayToRangeString($data['numbers']) }}
@endsection