@extends('backend.layout') {{-- this style will be applied when the direction of language is right-to-left --}} @includeIf('backend.partials.rtl_style') @section('content')
{{ __('Properties') }}
@includeIf('backend.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() ->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 ($property->vendor_id != 0) {{ @$property->vendor->username }} @else {{ __('Admin') }} @endif {{ $property->type }} {{ $property->cityContent?->name }}
@csrf
@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')
@elseif ($pendingfeatured) Pending @elseif(!empty($featuredProperty) && !$featuredExpired && !$pendingfeatured)
@csrf
@endif
@csrf
@endif
@endsection @section('script') @endsection