@extends('vendors.layout') {{-- this style will be applied when the direction of language is right-to-left --}} @includeIf('backend.partials.rtl_style') @section('content')
{{ __('Properties') }}
@includeIf('vendors.partials.languages')
{{ __('Add Property') }}
@if (count($properties) == 0)

{{ __('NO PROPERTY FOUND!') }}

@else
@foreach ($properties as $property) @endforeach
{{ __('Title') }} {{ __('Post by') }} {{ __('Type') }} {{ __('City') }} {{ __('Approval Status') }} {{ __('Featured') }} {{ __('Status') }} {{ __('Actions') }}
@php $property_content = $property->getContent($language->id); if (is_null($property_content)) { $property_content = $property ->propertyContents() ->where('language_id', $language->id) ->first(); } @endphp @if (!empty($property_content)) {{ strlen(@$property_content->title) > 100 ? mb_substr(@$property_content->title, 0, 100, 'utf-8') . '...' : @$property_content->title }} @endif @if (!is_null($property->agent_id) && $property->agent_id != 0) {{ @$property->agent->username }} @else {{ __('Vendor') }} @endif {{ $property->type }} {{ $property->cityContent->name }} @if ($property->approve_status == 1) {{ __('Approved') }} @elseif($property->approve_status == 0) {{ __('Pending') }} @else {{ __('Rejected') }} @endif @php $featuredProperty = $property ->featuredProperties() ->latest() ->first(); $pendingfeatured = false; $featuredExpired = false; $featured = false; if ( !empty($featuredProperty) && $featuredProperty->status == 0 && $featuredProperty->start_date == null && $featuredProperty->end_date == null ) { $pendingfeatured = true; } elseif ( !empty($featuredProperty) && $featuredProperty->status == 1 && $featuredProperty->start_date != null && $featuredProperty->end_date != null ) { $featuredExpired = Carbon\Carbon::now() ->timezone($settings->timezone) ->gte( \Carbon\Carbon::parse( $featuredProperty->end_date, ), ); } else { $featured = true; } @endphp @if (empty($featuredProperty) || $featuredExpired || $featuredProperty->payment_status == 'rejected' || $featuredProperty?->status == 2)
@elseif ($pendingfeatured) Pending @elseif(!empty($featuredProperty) && !$featuredExpired && !$pendingfeatured)
@csrf
@endif
@csrf
@endif