{{ __('locale.Vehicle Details') }}

{{ $user->name }}
  • {{ __('locale.Email') }}: {{ $user->email }}
  • {{ __('locale.Phone') }}: {{ $user->dial_code }}{{ $user->phone }}
  • {{ __('locale.Description') }}: {{ $user['driver']?->description ?? 'N/A' }}

{{ __('locale.Categories') }} @php $store = $user['store']; $selectedCategoryIds = $store?->categories?->pluck('id')->toArray() ?? []; $lastParentIdAtDepth = []; $groupedCategories = []; $childIdsByParent = []; foreach ($categories as $id => $name) { $depth = substr_count($name, '—'); $cleanName = ltrim($name, '— '); $parentId = $depth > 0 ? $lastParentIdAtDepth[$depth - 1] ?? null : null; $lastParentIdAtDepth[$depth] = $id; if ($parentId) { $childIdsByParent[$parentId][] = $id; } $groupedCategories[] = [ 'id' => $id, 'name' => $cleanName, 'depth' => $depth, 'parent_id' => $parentId, ]; } @endphp
@foreach ($groupedCategories as $parent) @if ($parent['depth'] === 0) @php $selectedChildren = array_intersect( $childIdsByParent[$parent['id']] ?? [], $selectedCategoryIds, ); $isParentSelected = in_array($parent['id'], $selectedCategoryIds); @endphp {{-- Skip parent if nothing selected --}} @if ($isParentSelected || count($selectedChildren))
{{-- Parent Category --}}
{{ $parent['name'] }}
{{-- Child Categories --}}
@foreach ($groupedCategories as $child) @if ($child['parent_id'] === $parent['id'] && in_array($child['id'], $selectedCategoryIds)) {{ $child['name'] }} @endif @endforeach
@endif @endif @endforeach

{{ __('locale.Store Details') }} & {{ __('locale.Address') }}

{{ $user->name }}

{{ $user->profile_photo_path }}
{{ __('locale.Name') }}:
{{ $user->name }}
{{ __('locale.Phone') }}:
{{ $user->dial_code }}{{ $user->phone }}
{{ __('locale.Address') }}:
{{ $user->store?->address }}
{{ __('locale.Landmark') }}:
{{ $user->store?->landmark }}
{{ __('locale.City') }}:
{{ $user->store?->city }}
{{ __('locale.State') }}:
{{ $user->store?->state }}
{{ __('locale.Country') }}:
{{ $user->store?->country }}
{{ __('locale.Postcode') }}:
{{ $user->store?->postcode }}
Previous Next