@extends('frontend.layouts.app') @section('content')
@include('frontend.member.member_listing.advanced_search')

{{ translate('All Active Members') }}

@foreach ($users as $key => $user)
@php $avatar_image = $user->member->gender == 1 ? 'assets/img/avatar-place.png' : 'assets/img/female-avatar-place.png'; $profile_picture_show = show_profile_picture($user); @endphp
@if ($user->membership == 1) {{ translate('Free') }} @elseif($user->membership == 2) {{ translate('Preminum') }} @endif

{{ $user->first_name . ' ' . $user->last_name }}

{{ translate('Member ID: ') }} {{ $user->code }}

Age

{{ \Carbon\Carbon::parse($user->member->birthday)->age }}

{{ translate('Height') }}

@if (!empty($user->physical_attributes->height)) {{ $user->physical_attributes->height }} @else - @endif

Mother Tongue

@if ($user->member->mothere_tongue != null) {{ \App\Models\MemberLanguage::where('id', $user->member->mothere_tongue)->first()->name }} @else - @endif

{{ translate('Religion') }}

@if (!empty($user->spiritual_backgrounds->religion_id)) {{ $user->spiritual_backgrounds->religion->name }} @else - @endif

{{ translate('Caste') }}

@if (!empty($user->spiritual_backgrounds->caste_id)) {{ $user->spiritual_backgrounds->caste->name }} @else - @endif

Marital Status

@if ($user->member->marital_status_id != null) {{ $user->member->marital_status->name }} @else - @endif

Location

@php $present_address = \App\Models\Address::where('type', 'present') ->where('user_id', $user->id) ->first(); $address_parts = []; if (!empty($present_address->address)) { $address_parts[] = strlen($present_address->address) > 20 ? substr($present_address->address, 0, 20) . '...' : $present_address->address; } if (!empty($present_address->city_id)) { $address_parts[] = $present_address->city->name; } if (!empty($present_address->state_id)) { $address_parts[] = $present_address->state->name; } if (!empty($present_address->country_id)) { $address_parts[] = $present_address->country->name; } if (!empty($present_address->postal_code)) { $address_parts[] = $present_address->postal_code; } @endphp {{ implode(', ', $address_parts) }}
@php $interest_class = 'text-primary'; $do_expressed_interest = \App\Models\ExpressInterest::where('user_id', $user->id) ->where('interested_by', Auth::user()->id) ->first(); $received_expressed_interest = \App\Models\ExpressInterest::where('user_id', Auth::user()->id) ->where('interested_by', $user->id) ->first(); if (empty($do_expressed_interest) && empty($received_expressed_interest)) { $interest_onclick = 1; $interest_text = translate('Interest'); $interest_class = 'text-dark'; } elseif (!empty($received_expressed_interest)) { $interest_onclick = 'do_response'; $interest_text = $received_expressed_interest->status == 0 ? translate('Response to Interest') : translate('You Accepted Interest'); } else { $interest_onclick = 0; $interest_text = $do_expressed_interest->status == 0 ? translate('Interest Expressed') : translate('Interest Accepted'); } @endphp {{ $interest_text }}
@php $shortlist = \App\Models\Shortlist::where('user_id', $user->id) ->where('shortlisted_by', Auth::user()->id) ->first(); if (empty($shortlist)) { $shortlist_onclick = 1; $shortlist_text = translate('Shortlist'); $shortlist_class = 'text-dark'; } else { $shortlist_onclick = 0; $shortlist_text = translate('Shortlisted'); $shortlist_class = 'text-primary'; } @endphp {{ $shortlist_text }}
@php $profile_reported = \App\Models\ReportedUser::where('user_id', $user->id) ->where('reported_by', Auth::user()->id) ->first(); if (empty($profile_reported)) { $report_onclick = 1; $report_text = translate('Report'); $report_class = 'text-dark'; } else { $report_onclick = 0; $report_text = translate('Reported'); $report_class = 'text-primary'; } @endphp {{ $report_text }}
@endforeach
{{ $users->appends(request()->input())->links() }}
@endsection @section('modal') @include('modals.package_update_alert_modal') @include('modals.confirm_modal') @endsection @section('script') @endsection