@php use App\Libraries\General; use App\Libraries\DateTime; use App\Libraries\FileSystem; $age = ''; @endphp @extends('layouts.frontlayout') @section('content')
@if(isset($product['pet_status']) && $product['pet_status'] == 1) @php $corner_class = ''; $class = 'available'; $text = 'Available'; @endphp @elseif(isset($product['pet_status']) && $product['pet_status'] == 2) @php $corner_class = 'change_bg1'; $class = 'hold'; $text = 'Hold'; @endphp @elseif(isset($product['pet_status']) && $product['pet_status'] == 3) @php $corner_class = 'change_bg2'; $class = ''; $text = 'Sold'; @endphp @else @php $corner_class = ''; $class = ''; $text = ''; @endphp @endif
@php $img = ''; $pet_images = isset($product->image) && $product->image ? json_decode($product->image) : []; $pet_videos = isset($product->video) && $product->video ? FileSystem::getAllVideoThumbnailImages($product->video,'videos_thumbnails') : []; $pet_youtube = isset($product->youtube) && $product->youtube ? json_decode($product->youtube) : []; $pet_facebook = isset($product->facebook) && $product->facebook ? json_decode($product->facebook) : []; @endphp @if(isset($pet_images) && count($pet_images) > 0) @else ... @endif

{{ time_ago($product->created) }}

@if($totalViews > 0)
{{ $totalViews }} viewed this AD
@endif

{{ $product->title }}

@if(isset($product->ad_type) && $product->ad_type == 'available_dogs')

{{ isset($product->price) && $product->price > 0.00 && $product->price_status == 1 ? priceformat($product->price) : 'Please Contact'; }}

@endif @if(isset($product->state_name) && $product->state_name && isset($product->country_name) && $product->country_name)

{{ $product->state_name.', '.$product->country_name }}

@elseif(!isset($product->state_name) && isset($product->country_name) && $product->country_name)

{{ $product->country_name }}

@endif
{{-- @if(isset($product) && $product['gender'] == 'male' ) @elseif(isset($product) && $product['gender'] == 'female' ) @endif --}} @php $microchips = []; if(count($product['dog_microchip']) > 0) { foreach($product['dog_microchip'] as $k => $d) { $microchips[] = $d['gender']; } } @endphp @if(isset($microchips) && $microchips && in_array('male', $microchips) && isset($microchips) && $microchips && in_array('female', $microchips)) @elseif(isset($microchips) && $microchips && in_array('male', $microchips) && !in_array('female', $microchips)) @elseif(isset($microchips) && $microchips && in_array('female', $microchips) && !in_array('male', $microchips)) @endif
...
{{ $product->user_first_name.' '.$product->user_last_name }}

@if($product->users->user_type == 'buyer') {{ 'Private buyer/seller' }} @elseif($product->users->user_type == 'seller') {{ $product->users->seller_id }} @elseif($product->users->user_type == 'rbe') {{ $product->users->rbe_number }} @elseif($product->users->user_type == 'rco') {{ $product->users->charitable_number }} @endif

@if(isset($product->user_state_name) && $product->user_state_name && isset($product->user_country_name) && $product->user_country_name)

{{ $product->user_state_name.', '.$product->user_country_name }}

@elseif(!isset($product->user_state_name) && isset($product->user_country_name) && $product->user_country_name)

{{ $product->user_country_name }}

@endif

@if(isset($product->description) && $product->description)

{!! nl2br($product->description) !!}

@else

No Description Found

@endif
@if(isset($champion) && $champion) @endif

@if(isset($product['categories']) && $product['categories'])

Breed :

@foreach($product['categories'] as $cKey => $cvalue) {{ $cvalue['title'] }} @endforeach

@endif @if(isset($product['color']) && $product['color'])

Color :

{{ isset($product['color']) && $product['color'] ? $product['color'] : 'N/A' }}

@endif @if(isset($product['dob']) && $product['dob'])

@if(isset($product['ad_type']) && $product['ad_type'] == 'upcoming_litter' ) {{ ' Expected Date of birth :' }} @else {{ ' Date of birth :' }} @php $age = '('.DateTime::ageCalculator($product['dob']).')'; @endphp @endif

{{ isset($product['dob']) && $product['dob'] ? _d($product['dob']).$age : 'N/A' }}

@endif @if(isset($product['country_name']) && $product['country_name'])

Country :

{{ isset($product['country_name']) && $product['country_name'] ? $product['country_name'] : 'N/A' }}

@endif @if(isset($product['country_origin']) && $product['country_origin'])

Country of origin:

{{ isset($product['country_origin']) && $product['country_origin'] ? ucwords($product['country_origin']) : 'N/A' }}

@endif @if(isset($product['users']['business_name']) && $product['users']['business_name'])

Kennel name :

{{ isset($product['users']['business_name']) && $product['users']['business_name'] ? $product['users']['business_name'] : 'N/A' }}

@endif @if(isset($product['users']['seller_id']) && $product['users']['seller_id'])

Seller ID :

{{ isset($product['users']['seller_id']) && $product['users']['seller_id'] ? $product['users']['seller_id'] : 'N/A' }}

@endif @if(isset($product['users']['rbe_breeding_bitches']) && $product['users']['rbe_breeding_bitches'])

Max No of Breeding Bitches :

{{ isset($product['users']['rbe_breeding_bitches']) && $product['users']['rbe_breeding_bitches'] ? $product['users']['rbe_breeding_bitches'] : 'N/A' }}

@endif

@if(!empty($microchip_data->toArray()) && $microchip_data) @foreach($microchip_data as $microchip_dataKey => $microchip_dataValue) @endforeach @else @endif
Microchip Number Gender Color Status
{{ isset($microchip_dataValue['microchip_number']) && $microchip_dataValue['microchip_number'] ? $microchip_dataValue['microchip_number'] : '' }} {{ isset($microchip_dataValue['gender']) && $microchip_dataValue['gender'] ? ucfirst($microchip_dataValue['gender']) : '' }} {{ isset($microchip_dataValue['dog_color']) && $microchip_dataValue['dog_color'] ? $microchip_dataValue['dog_color'] : '' }} @if($microchip_dataValue['status'] == 1)

Available

@elseif($microchip_dataValue['status'] == 2)

Hold

@elseif($microchip_dataValue['status'] == 3)

Sold

@endif

No Microchip Details Found

@if(isset($product->ad_type) && $product->ad_type == 'available_dogs')
    @if(isset($product['registration_health']) && $product['registration_health']) @php $registration_health = isset($product['registration_health']) && $product['registration_health'] ? json_decode($product['registration_health']) : []; @endphp @foreach($registration_health as $rKey => $rValue)
  • @if($rValue == 'ikc_registered') {{ 'KC Registered' }} @else {{ ucwords(str_replace('_', ' ', $rValue)) }} @endif
  • @endforeach @else

    No Registration Found

    @endif
@endif

@if(!empty($sire_health_test->toArray()) && $sire_health_test || !empty($dam_health_test->toArray()) && $dam_health_test)
@if(!empty($sire_health_test->toArray()) && $sire_health_test)

Sire : {{ isset($product['health_test_sire_name']) && $product['health_test_sire_name'] ? $product['health_test_sire_name'] : 'N/A' }}

@foreach($sire_health_test as $sireHealthKey => $sireHealthValue) @endforeach
Test Result Date
{{ $sireHealthValue['test_name'] }} {{ $sireHealthValue['result'] }} {{ _d($sireHealthValue['test_date']) }}
@endif @if(!empty($dam_health_test->toArray()) && $dam_health_test)

Dam : {{ isset($product['health_test_dam_name']) && $product['health_test_dam_name'] ? $product['health_test_dam_name'] : 'N/A' }}

@foreach($dam_health_test as $damHealthKey =>$damHealthValue) @endforeach
Test Result Date
{{ $damHealthValue['test_name'] }} {{ $damHealthValue['result'] }} {{ _d($damHealthValue['test_date']) }}
@endif
@else

No Health Test Found

@endif
Pedigree
@if(!empty($pedigree) && $pedigree)
@if(isset($product['display_generations']) && $product['display_generations'] == 4) @endif @foreach($pedigree as $parent) @if(isset($product['display_generations']) && $product['display_generations'] == 4) @endif @endforeach
Parents Grand Parents Great Grand Parents Great Great Grand Parents
{{ $parent['name'] }}
@foreach($parent['grand_parent'] as $grandParent) @endforeach
{{ $grandParent['name'] }}
@foreach($parent['grand_parent'] as $grandParent) @foreach($grandParent['great_grand_parents'] as $greatGrandParent) @endforeach @endforeach
{{ $greatGrandParent['name'] }}
@foreach($parent['grand_parent'] as $grandParent) @foreach($grandParent['great_grand_parents'] as $greatGrandParent) @foreach($greatGrandParent['great_great_grandparent'] as $greatGreatGrandParent) @endforeach @endforeach @endforeach
{{ $greatGreatGrandParent['name'] }}
@else

No Pedigree Details Found

@endif
@include('frontend.products.instructionTips') @endsection