@if($estimatedCost)
Estimated Cost Per Person: AED {{ $estimatedCost->price_range }}
@else
Estimated cost per person has not been set yet.
@endif
Sl No |
Item |
Price |
@foreach($costBreakdowns as $key => $cost)
{{ $loop->iteration }} |
{{ $cost->item }} |
AED {{ $cost->price }} |
@endforeach
Sl No |
Item |
Actions |
@foreach($costBreakdowns as $key => $cost)
{{ $loop->iteration }} |
@if($cost->items->isNotEmpty())
@php
// Get the first item that is a main item (parent_id is null)
$mainItem = $cost->items->firstWhere('parent_id', null);
$subItems = $cost->items->where('parent_id', '!=', null);
@endphp
@if($mainItem)
{{ $mainItem->item }}: AED {{ $mainItem->price }}
@else
No main item found.
@endif
@else
No items available.
@endif
@if($subItems->isNotEmpty())
@foreach($subItems as $item)
@if($item->parent_id !== null)
-
{{ $item->item }}: AED {{ $item->price }}
@if($item->subItems->isNotEmpty())
@foreach($item->subItems as $subItem)
- {{ $subItem->item }}: AED {{ $subItem->price }}
@endforeach
@endif
@endif
@endforeach
@else
@endif
|
|
@endforeach