@php $listingType = (string) ($listing['type'] ?? 'property'); $formattedPrice = is_numeric($listing['price'] ?? null) ? 'INR '.number_format((float) $listing['price']) : ($listing['price'] ?? 'On Request'); $details = $listing['details'] ?? []; $mainGallery = array_values($listing['gallery'] ?? []); $shareTitle = addslashes((string) ($listing['title'] ?? 'Listing')); $alreadyInterested = (bool) ($listing['already_interested'] ?? false); $priceLabel = match ($listingType) { 'job' => 'SALARY', 'education' => 'FEE', 'service' => 'PRICE', default => 'PRICE / RENT', }; $detailsTitle = match ($listingType) { 'job' => 'Job Details', 'education' => 'Course Details', 'service' => 'Service Details', default => 'Property Details', }; $interestLabelVerb = match ($listingType) { 'job' => 'Apply / Enquire', 'education' => 'Enquire for Admission', 'service' => 'Enquire Now', default => 'Interested?', }; $interestLabelDone = match ($listingType) { 'job' => 'Application Submitted', 'education' => 'Enquiry Submitted', 'service' => 'Enquiry Submitted', default => 'Already Interested', }; if ($listingType === 'property') { $propertyTypeLabel = isset($details['property_type']) ? ucwords(str_replace('_', ' ', (string) $details['property_type'])) : '-'; $propertyCategoryLabel = isset($details['property_category']) ? ucfirst((string) $details['property_category']) : '-'; $purposeLabel = isset($details['listing_purpose']) ? ucfirst((string) $details['listing_purpose']) : '-'; $furnishingLabel = ! empty($details['furnishing']) ? ucwords(str_replace('_', ' ', (string) $details['furnishing'])) : '-'; $totalFiles = [ 'Property Name' => $details['property_name'] ?? $listing['title'] ?? '-', 'Type' => $propertyTypeLabel, 'Category' => $propertyCategoryLabel, 'Purpose' => $purposeLabel, 'BHK' => $details['bhk'] ?? '-', 'Furnishing' => $furnishingLabel, 'Area SqFt' => ! empty($details['area_sqft']) ? $details['area_sqft'].' sqft' : '-', 'Area' => $details['area_name'] ?? '-', 'Pincode' => $details['pincode'] ?? '-', 'Bathrooms' => $details['bathrooms'] ?? '-', 'Car Parking' => $details['parking'] ?? '-', 'Floor No' => $details['floor_no'] ?? '-', 'No Of Floors' => $details['total_floors'] ?? '-', 'Hall' => $details['hall'] ?? '-', 'Guest Room' => $details['guest_room'] ?? '-', 'Facing' => ! empty($details['facing']) ? ucwords(str_replace('_', ' ', (string) $details['facing'])) : '-', ]; } elseif ($listingType === 'job') { $totalFiles = array_filter([ 'Job Title' => $listing['title'] ?? '-', 'Company' => $details['company_name'] ?? null, 'Category' => $listing['category'] ?? null, 'Role type' => match ($details['job_segment'] ?? '') { 'it' => 'IT Jobs', 'non_it' => 'Non-IT Jobs', default => null, }, 'Employment type' => ! empty($details['job_type']) ? ucwords(str_replace('_', ' ', (string) $details['job_type'])) : null, 'Experience' => ! empty($details['experience_level']) ? ucfirst((string) $details['experience_level']) : null, 'Openings' => $details['openings'] ?? null, 'Skills' => $details['skills'] ?? null, 'Salary' => (! empty($details['salary_min']) || ! empty($details['salary_max'])) ? trim(($details['salary_min'] ?? '').' - '.($details['salary_max'] ?? '')) : null, 'Location' => $listing['location'] ?? '-', ]); } elseif ($listingType === 'education') { $totalFiles = array_filter([ 'Course Title' => $listing['title'] ?? '-', 'Institute' => $details['institute_name'] ?? null, 'Course Type' => ! empty($details['course_type']) ? ucfirst((string) $details['course_type']) : null, 'Study Mode' => ! empty($details['study_mode']) ? ucfirst((string) $details['study_mode']) : null, 'Duration' => $details['duration'] ?? null, 'Fees' => $details['fees'] ?? null, 'Eligibility' => $details['eligibility'] ?? null, 'Intake' => $details['intake'] ?? null, 'Location' => $listing['location'] ?? '-', ]); } else { // service $totalFiles = array_filter([ 'Service' => $listing['title'] ?? '-', 'Provider' => $details['provider_name'] ?? null, 'Service Area' => $details['service_area'] ?? null, 'Mode' => ! empty($details['service_mode']) ? ucwords(str_replace('_', ' ', (string) $details['service_mode'])) : null, 'Availability' => $details['availability'] ?? null, 'Response Time' => $details['response_time'] ?? null, 'Starting Price' => $details['starting_price'] ?? null, 'Rating' => $details['rating'] ?? null, 'Location' => $listing['location'] ?? '-', ]); } @endphp @if($listingType === 'service')
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif @php $hasRealImages = (bool) ($listing['has_real_images'] ?? false); $imageCount = (int) ($listing['image_count'] ?? 0); $heroImage = $mainGallery[0] ?? 'https://images.unsplash.com/photo-1581578731548-c64695cc6952?w=800'; $hasMultipleImages = $imageCount > 1; @endphp
{{-- Left: service details --}}
{{-- Summary card: image on the left, title + meta + description on the right --}}
{{ $listing['title'] }} Service @if($hasRealImages && $hasMultipleImages) {{ $imageCount }} @endif

{{ $listing['title'] }}

{{ $listing['location'] }}

Starting

{{ $formattedPrice }}

4.8 Rating Verified Pro Safe & Insured @if(! empty($listing['posted_on'])) Listed {{ $listing['posted_on'] }} @endif
@if($hasRealImages && $hasMultipleImages)
@foreach(array_slice($mainGallery, 0, 6) as $image)
@endforeach
@endif

About this service

{{ $listing['description'] ?: 'Service details will be shared after enquiry.' }}

Service Details

@foreach($totalFiles as $label => $value)

{{ $label }}

{{ $value ?: '-' }}

@endforeach

Why customers trust us

Trained Professionals

Background-verified local experts.

Quick Response

Typical call-back within 30 minutes.

Transparent Pricing

No hidden charges; upfront quote.

{{-- Right: enquiry form (sticky) --}}
@if(! empty($relatedListings))

More Services You May Like

@foreach(array_slice($relatedListings, 0, 6) as $nearby) @php $nearbyPrice = is_numeric($nearby['price'] ?? null) ? 'INR '.number_format((float) $nearby['price']) : ($nearby['price'] ?? 'On Request'); @endphp @endforeach
@endif
@elseif($listingType === 'education') @php $educationDetails = $listing['details'] ?? []; $programDetails = [ 'Program' => $listing['title'] ?? '-', 'Study level' => $educationDetails['study_level'] ?? '-', 'Duration' => $educationDetails['duration'] ?? '-', 'Eligibility' => $educationDetails['eligibility'] ?? '-', 'Course Type' => ! empty($educationDetails['course_type']) ? ucwords(str_replace('_', ' ', (string) $educationDetails['course_type'])) : '-', 'Average Fees' => $educationDetails['average_fee_range'] ?? '-', ]; $countries = $listing['countries'] ?? []; $universities = $listing['universities'] ?? []; $careerScope = $educationDetails['career_scope'] ?? $listing['description'] ?? ''; $jobRoles = array_values(array_filter(array_map('trim', explode(',', (string) ($educationDetails['job_roles'] ?? ''))))); $aboutText = $educationDetails['about'] ?? $listing['description'] ?? ''; @endphp
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif

{{ $listing['title'] }}

{{ $listing['location'] ?? 'Lucknow' }}

Average Fee Range

{{ $educationDetails['average_fee_range'] ?? $formattedPrice }}

About this program

{{ $aboutText !== '' ? $aboutText : 'Course details will be shared after enquiry.' }}

Program Details

@foreach($programDetails as $label => $value)

{{ $label }}

{{ $value ?: '-' }}

@endforeach

Overseas Education Service In Countries

@if(! empty($countries))
@foreach($countries as $country)
{{ $country }}
@endforeach
@else

Country list is not available.

@endif

Top University And Colleges In India

@if(! empty($universities))
    @foreach($universities as $university)
  • {{ $university }}
  • @endforeach
@else

University list is not available.

@endif

Career Scope

{{ $careerScope !== '' ? $careerScope : 'Career scope will be added soon.' }}

Job Roles You Can Pursue

@if(! empty($jobRoles))
@foreach($jobRoles as $role)
{{ $role }}
@endforeach
@else

Job roles will be published soon.

@endif
@elseif($listingType === 'property') @include('site.listings.partials.property-show') @else
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif

{{ $priceLabel }} - {{ $formattedPrice }}

{{ $listing['title'] }}

{{ $listing['location'] }}

Posted By - {{ $listing['posted_by'] ?? 'Owner' }}

Posted On : {{ $listing['posted_on'] ?? '-' }}

@if($listingType === 'property')

Detailed Address - {{ $listing['full_address'] ?? $listing['location'] }}

@endif

Detailed Description

{!! html_entity_decode($listing['description']) !!}

{{--

Detailed Description

{{ $listing['description'] }}

Detailed Address

{{ $listing['full_address'] ?? $listing['location'] }}

--}} @if(! empty($relatedListings)) @php $relatedHeading = match ($listingType) { 'job' => 'Similar Jobs', 'education' => 'Similar Courses', 'service' => 'More Services You May Like', default => 'More Properties Near You', }; @endphp @endif
@endif