| Plot Area : | {{ $property->plotAreaSqFt }} SqFt /{{ $property->plotAreaSqMeter }} SqMeter |
Plinth Area : | {{ reset($plinth) ?? $property->plinthAreaSqFt }} SqFt /{{ reset($plinthSm) ?? $property->plinthAreaSqMeter }} SqMeter |
Total Built-Up Area : | {{ number_format($totalPlinth, 2) ?? $property->totalBuiltUpAreaSqFt }} SqFt /{{ number_format($totalPlinthSm, 2) ?? $property->totalBuiltUpAreaSqMeter }} SqMeter |
| Floor Type |
Area (Sq Ft) |
Area (Sq Meter) |
Usage Type |
Usage Factor |
Construction Type |
@php
// Define the helper functions in the Blade view or a helper file
function floorType($floorType, $floors)
{
$floorId = (int) $floorType;
$floor = collect($floors)->firstWhere('id', $floorId);
return $floor ? $floor->name : '-';
}
function usageType($usageType, $floorUsageType) {
$usageTypeId = (int) $usageType;
$type = collect($floorUsageType)->firstWhere('id', $usageTypeId);
return $type ? $type->type_name : '-';
}
function usageFactors($usageFactor, $usagsFactors) {
$usageFactorId = (int) $usageFactor;
$factor = collect($usagsFactors)->firstWhere('id', $usageFactorId);
return $factor ? $factor->name : '-';
}
function yearOfConstructions($constructionType, $yearOfConstructions) {
$constructionTypeId = (int) $constructionType;
$type = collect($yearOfConstructions)->firstWhere('id', $constructionTypeId);
return $type ? $type->name : '-';
}
$floorData = json_decode($property->floorData);
if(!is_array($floorData))
$floorData = json_decode($floorData);
@endphp
@foreach( $floorData as $k=>$floor)
| {{ $floor->floorType == 'Other' ? $floor->floorTypeOther . ' (' . $floor->floorType . ')' : floorType($floor->floorType, $floors) }} |
{{ $floor->areaSqFt }} SqFt |
{{ $floor->areaSqMt }} SqM |
{{ $floor->usageType == 'Other' ? $floor->usageTypeOther . ' (' . $floor->usageType . ')' : usageType($floor->usageType, $floorUsageType) }} |
{{ $floor->usageFactor == 'Other' ? $floor->usageFactorOther . ' (' . $floor->usageFactor . ')' : usageFactors($floor->usageFactor, $usagsFactors) }} |
{{ $floor->constructionType == 'Other' ? $floor->constructionTypeOther . ' (' . $floor->constructionType . ')' : yearOfConstructions($floor->constructionType, $natureOfConstructionLists) }} |
@endforeach
|