@extends('admin.layouts.admin_master') @section('title', 'Buildings') @section('content')

Business List

@foreach($buildings as $index => $building) @endforeach
Sl No Address Suite/Unit Number Business Name Total Floors Floor Total Basement Basement status Action
{{ $index + 1 }} {{ $building->building_address }} {{ $building->suite_number }} {{ $building->building_name }} {{ $building->total_floor }} {{ $building->total_floor }} @if(count($building->floors) > 0)

{{ $building->floors[0]->floor_name }}

@if ($building->floors[0]->floor_image) Floor Image @else

No image available

@endif @else

No floors available

@endif
{{ $building->total_basement }} @if(count($building->basements) > 0) @foreach($building->basements as $basement)

{{ $basement->basement_name ?? 'No basement name' }}

@if ($basement->basement_image) Basement Image @else

No image available

@endif @endforeach @else

No Basement available

@endif
{{ $building->status == 1 ? 'Approved' : 'Pending' }}
@csrf @method('DELETE')
@endsection @section('script') @endsection