@if (count($listings) > 0)
@foreach ($listings as $listing)
@php
$listing_content = App\Models\Listing\ListingContent::where([
['language_id', $language->id],
['listing_id', $listing->id],
])->first();
$total_review = App\Models\Listing\ListingReview::where('listing_id', $listing->id)->count();
$today_date = now()->format('Y-m-d');
$feature = App\Models\FeatureOrder::where('order_status', '=', 'completed')
->where('listing_id', $listing->id)
->whereDate('end_date', '>=', $today_date)
->first();
@endphp
@if (!empty($listing_content))
@php
$categorySlug = App\Models\ListingCategory::findorfail($listing_content->category_id);
@endphp
{{ $categorySlug->name }}
({{ number_format($listing->average_rating, 2) }})
{{ $listing_content->review_count }}
{{ $total_review }} {{ __('Reviews') }}
@php
if ($listing_content->city_id) {
$city = App\Models\Location\City::Where('id', $listing_content->city_id)->first()
->name;
}
if ($listing_content->state_id) {
$State = App\Models\Location\State::Where('id', $listing_content->state_id)->first()
->name;
}
if ($listing_content->country_id) {
$country = App\Models\Location\Country::Where(
'id',
$listing_content->country_id,
)->first()->name;
}
@endphp
{{ @$city }}@if (@$State)
,{{ $State }}
@endif @if (@$country)
,{{ @$country }}
@endif
@if ($listing_content->max_price && $listing_content->min_price)
{{ __('From') }}
{{ $currencyInfo->base_currency_symbol }}{{ $listing_content->min_price }}
-
{{ $currencyInfo->base_currency_symbol }}{{ $listing_content->max_price }}
@endif
@endif
@endforeach
@else
{{ __('NO LISTING FOUND') }}
@endif
@foreach ($categories as $category)
@php
$category_id = $category->id;
$listings = App\Models\Listing\Listing::join(
'listing_contents',
'listing_contents.listing_id',
'listings.id',
)
->where([
['vendor_id', $vendor_id],
['listings.status', '=', '1'],
['listings.visibility', '=', '1'],
])
->where('listing_contents.language_id', $language->id)
->where('listing_contents.category_id', $category_id)
->select('listings.*', 'listing_contents.slug', 'listing_contents.title')
->orderBy('id', 'desc')
->get();
@endphp
@if (count($listings) > 0)
@foreach ($listings as $listing)
@php
$listing_content = App\Models\Listing\ListingContent::where([
['language_id', $language->id],
['listing_id', $listing->id],
])->first();
$total_review = App\Models\Listing\ListingReview::where('listing_id', $listing->id)->count();
$today_date = now()->format('Y-m-d');
$feature = App\Models\FeatureOrder::where('order_status', '=', 'completed')
->where('listing_id', $listing->id)
->whereDate('end_date', '>=', $today_date)
->first();
@endphp
@if (!empty($listing_content))
@php
$categorySlug = App\Models\ListingCategory::findorfail($listing_content->category_id);
@endphp
{{ $categorySlug->name }}
({{ number_format($listing->average_rating, 2) }})
{{ $listing_content->review_count }}
{{ $total_review }} {{ __('Reviews') }}
@php
if ($listing_content->city_id) {
$city = App\Models\Location\City::Where('id', $listing_content->city_id)->first()
->name;
}
if ($listing_content->state_id) {
$State = App\Models\Location\State::Where('id', $listing_content->state_id)->first()
->name;
}
if ($listing_content->country_id) {
$country = App\Models\Location\Country::Where(
'id',
$listing_content->country_id,
)->first()->name;
}
@endphp
{{ @$city }}@if (@$State)
,{{ $State }}
@endif @if (@$country)
,{{ @$country }}
@endif
@if ($listing_content->max_price && $listing_content->min_price)
{{ __('From') }}
{{ $currencyInfo->base_currency_symbol }}{{ $listing_content->min_price }}
-
{{ $currencyInfo->base_currency_symbol }}{{ $listing_content->max_price }}
@endif
@endif
@endforeach
@endif
@endforeach