@php $cols = count($floorTypes) * count($usageTypes) * count($constructionTypes); @endphp @foreach ($floorTypes as $floor) @endforeach @foreach ($floorTypes as $floor) @foreach ($usageTypes as $usage) @endforeach @endforeach @foreach ($floorTypes as $floor) @foreach ($usageTypes as $usage) @foreach ($constructionTypes as $type) @endforeach @endforeach @endforeach @foreach ($properties as $i => $property) @foreach ($floorTypes as $floor) @foreach ($usageTypes as $usage) @php $floors = is_string($property->floors) ? json_decode($property->floors) : $property->floors; @endphp @foreach ($constructionTypes as $type) @php $sum = 0; foreach ($floors as $f) { if ( (isset($f->floorType->id) && $f->floorType->id == $floor->id) && (isset($f->usageType->name) && $f->usageType->name == $usage) && (isset($f->constructionType->id) && $f->constructionType->id == $type) ) { $sum += $f->areaSqFt ?? 0; } } @endphp @endforeach @endforeach @endforeach @endforeach
SN Survey Id Floors
{{ $floor->name }}
{{ $usage }}
{{ $constructionAliases[$type] }}
{{ $i + 1 }} {{ $property->nagarpalikaId }} {{ $sum ?: '-' }}