@if($provider->sub_category_id)
@endif
{{-- Gallery Images --}}
@if(in_array($provider->category->type, ['hall', 'chalet', 'rest', 'hotel']) && $provider->images()->where('type', 'add')->count() > 0)
{{ __('admin.images') }}
@foreach($provider->images()->where('type', 'add')->get() as $image)
@endforeach
@endif
{{-- Additional Fields based on Category --}}
@if($provider->category->type === 'hall')
@elseif(in_array($provider->category->type, ['chalet', 'rest', 'hotel']))
@endif
{{-- Additions (Free/Paid) --}}
@if(in_array($provider->category->type, ['hall', 'chalet', 'rest', 'hotel']))
@php
$freeAdditions = $provider->additions->where('type', 'free');
$paidAdditions = $provider->additions->where('type', 'paid');
@endphp
@if($freeAdditions->count() > 0 || $paidAdditions->count() > 0)
{{ __('admin.additions') }}
{{-- Free Additions --}}
@if($freeAdditions->count() > 0)
{{ __('admin.free_additions') }}
@foreach($freeAdditions as $addition)
@php
// ProviderAddition::getImageAttribute() returns a default placeholder when DB image is null,
// so we must check the raw DB value to avoid showing broken/placeholder images.
$rawAdditionImage = $addition->getRawOriginal('image');
$hasAdditionImage = !empty($rawAdditionImage) && !in_array(strtolower(trim((string) $rawAdditionImage)), ['null']);
$additionImage = $hasAdditionImage ? $addition->image : null;
@endphp
@if($hasAdditionImage && $additionImage)
@endif
{{ $addition->name }}
{{ __('admin.price') }}: 0
@endforeach
@endif
{{-- Paid Additions --}}
@if($paidAdditions->count() > 0)
{{ __('admin.paid_additions') }}
@foreach($paidAdditions as $addition)
@php
// ProviderAddition::getImageAttribute() returns a default placeholder when DB image is null,
// so we must check the raw DB value to avoid showing broken/placeholder images.
$rawAdditionImage = $addition->getRawOriginal('image');
$hasAdditionImage = !empty($rawAdditionImage) && !in_array(strtolower(trim((string) $rawAdditionImage)), ['null']);
$additionImage = $hasAdditionImage ? $addition->image : null;
@endphp
@if($hasAdditionImage && $additionImage)
@endif
{{ $addition->name }}
{{ __('admin.price') }}: {{ $addition->price }}
@endforeach
@endif
@endif
@endif
{{-- Identity Data --}}
{{ __('admin.identity_data') }}
{{-- Bank Data --}}
{{ __('admin.bank_data') }}