@extends('layouts.agent') @push('css') @endpush @section('content')
{{ __('Viewed Contacts For These Properties') }}

@lang('Viewed Contact Properties')

@foreach ($contacts as $contact) @php $property = $contact->property; @endphp @if ($property) @php $routes = [ 'for_pg' => 'pg.details', 'for_rent' => 'rent.details', 'for_sell' => 'buy.details', 'plot' => 'plot.details', 'commercial' => 'commercial.details', ]; $propertyUrl = isset($routes[$property->looking_for]) ? route($routes[$property->looking_for], $property->slug) : '#'; // fallback @endphp
{{-- Column 1: Property Image --}}
{{ $property->name }} {{-- Badge --}} @if ($property->looking_for == 'for_rent') {{ __('For Rent') }} @elseif ($property->looking_for == 'for_sell') {{ __('For Sell') }} @elseif ($property->looking_for == 'for_pg') {{ __('For PG') }} @else {{ __('Property') }} @endif
{{-- Column 2: Price + Location --}}

{{ showAmount($property->price) }}

{{ $property->location->name ?? '' }}

{{ $property->name }}

Contacted {{ \Carbon\Carbon::parse($contact->created_at)->format('d M Y \a\t h:i A') }}
@if (Auth::user()->plan_id == null) {{-- For Free Users – Show button & JS logic --}} @else {{-- For Paid Users – Show full lead info always --}}

{{ ucwords($contact->details ?? '') }}

{{ $contact->phone ?? '' }}

{{ $contact->email ?? '' }}

@endif

@if ($property->status == 1) View Properties @else View Properties @endif
@endif @endforeach
{{ $contacts->links() }}
@endsection @section('scripts') @endsection