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

{{ __('NO LISTING FOUND') . '!' }}

@else
@if (count($charges) > 0) @endif @foreach ($listings as $listing) @php $listing_content = $listing->listing_content->first(); if (is_null($listing_content)) { $listing_content = App\Models\Listing\ListingContent::where('listing_id', $listing->id) ->where('language_id', $language->id) ->first(); } if (empty($listing->vendor_id) || $listing->vendor_id == 0) { $vendorId = 0; $current_package = []; $permissions = [ 'Listing Enquiry Form', 'Video', 'Amenities', 'Feature', 'Social Links', 'FAQ', 'Business Hours', 'Products', 'Product Enquiry Form', 'Messenger', 'WhatsApp', 'Telegram', 'Tawk.To', ]; } else { $vendorId = $listing->vendor_id; $current_package = App\Http\Helpers\VendorPermissionHelper::packagePermission($vendorId); if (!empty($current_package->features)) { $permissions = $current_package->features; } if (!empty($current_package->features)) { $permissions = json_decode($permissions, true); } } @endphp @if (count($charges) > 0) @endif @include('admin.listing.feature-payment') @endforeach @if (count($listings) < 3) @endif
{{ __('Featured Image') }} {{ __('Title') }} {{ __('Vendor') }}{{ __('Featured Status') }}{{ __('Category') }} {{ __('Approve Status') }} {{ __('Hide/Show') }} {{ __('Actions') }}
@if (!empty($listing_content))
...
@else
...
@endif
@if (!empty($listing_content)) {{ strlen(@$listing_content->title) > 50 ? mb_substr(@$listing_content->title, 0, 50, 'utf-8') . '...' : @$listing_content->title }} @else -- @endif @if ($listing->vendor_id != 0) {{ @$listing->vendor->username }} @else {{ __('Admin') }} @endif @php $order_status = App\Models\FeatureOrder::where('listing_id', $listing->id)->first(); $today_date = now()->format('Y-m-d'); @endphp @if (is_null($order_status)) @endif @if ($order_status) @if ($order_status->order_status == 'pending')

{{ ucfirst('pending') }}

@endif @if ($order_status->order_status == 'completed') @if ($order_status->end_date < $today_date) @else @if ($listing->vendor_id != 0)

{{ ucfirst('Active') }}

@else
@csrf
@endif @endif @endif @if ($order_status->order_status == 'rejected') @endif @endif
@if (!empty($listing_content)) @php $categoryName = App\Models\ListingCategory::where( 'id', $listing_content->category_id, )->first(); @endphp {{ @$categoryName->name }} @else -- @endif
@csrf
@csrf
@if ($current_package == '[]')
@csrf
@else @endif
@endif
@endsection