@extends('layouts.app') {{-- Карточка заведения (ТЗ §8.4, §9), разметка по макету `design/new design and ui`. --}} @php $rating = $venue->rating; $hasRating = $rating !== null && $rating->reviews_count > 0; $cuisines = $venue->cuisines->pluck('name')->implode(', '); $photos = $venue->photos; $gallery = $photos->take(3); $rest = max(0, $photos->count() - 3); $today = collect($week)->firstWhere('is_today', true); $isOpen = app(\App\Domain\Catalog\Services\VenueScheduleService::class)->isOpenAt($venue); $meta = collect([ $hasRating ? trans_choice(':count отзыв|:count отзыва|:count отзывов', $rating->reviews_count, ['count' => $rating->reviews_count]) : null, $cuisines ?: null, $venue->profile?->average_bill ? $venue->profile->averageBillForHumans() : null, ])->filter()->implode(' · '); @endphp {{-- Title и Description собирает SeoResolver: шаблон типа страницы плюс индивидуальное переопределение из админки (ТЗ §18.3). --}} @section('title', $seo->title ?? $venue->name.' в '.$city->inCity()) @section('description', $seo->description ?? trim($venue->name.': '.$cuisines.($cuisines ? ', ' : '').$venue->address)) @push('meta') @if ($seo->noindex) @endif @if ($ogDescription = $seo->ogDescriptionOrDescription()) @endif @if ($photo = $seo->ogImage ?? $venue->profile?->primaryPhoto?->largeUrl()) @endif @include('partials.schema-venue') @endpush @section('content')
{{-- Галерея: главное фото на две строки, два снимка рядом --}}
@forelse ($gallery as $index => $photo)
$index === 0, 'hidden sm:block' => $index > 0, ])> @if ($url = $photo->previewUrl()) {{ $photo->alt ?: $venue->name }} @endif @if ($index === 2 && $rest > 0) Ещё {{ $rest }} @endif
@empty
{{ $venue->name }}
@endforelse

{{ $seo->h1 ?? $venue->name }}

@if ($hasRating) {{ number_format((float) $rating->average_rating, 1, ',', '') }} @endif @if ($meta !== '') {{ $meta }} @endif @if ($isOpen && $today && $today['intervals'] !== []) Открыто до {{ \Illuminate\Support\Str::afterLast($today['intervals'][array_key_last($today['intervals'])], '–') }} @else {{ $isOpen ? 'Открыто' : 'Закрыто' }} @endif
{{-- Адрес, часы, телефон, сайт --}}
{{ $venue->address }}
{{ $city->name }}
{{ $today ? $today['label'].' '.($today['intervals'] === [] ? 'выходной' : implode(', ', $today['intervals'])) : 'Часы уточняются' }}
Время местное
@if ($phone = $venue->publicPhone()) @endif @if ($site = $venue->publicWebsite()) @endif
@if ($venue->profile?->description || $venue->profile?->short_description)

О заведении

{{ $venue->profile->description ?: $venue->profile->short_description }}

@endif @if ($venue->features->isNotEmpty())
@foreach ($venue->features as $feature) {{ $feature->name }} @endforeach
@endif @if ($venue->contact && $venue->contact->socialLinks() !== [])
@foreach ($venue->contact->socialLinks() as $network => $url) {{ ucfirst($network) }} @endforeach
@endif

Часы работы

@foreach ($week as $day)
$day['is_today'], 'text-ink-60' => ! $day['is_today'], ])>
{{ $day['label'] }}
{{ $day['intervals'] === [] ? 'выходной' : implode(', ', $day['intervals']) }}
@endforeach
{{-- Отзывы (ТЗ §13.6). Показываются только опубликованные. --}}

Отзывы гостей

@if ($hasRating)

{{ number_format((float) $rating->average_rating, 1, ',', '') }} из 5 · {{ trans_choice(':count отзыв|:count отзыва|:count отзывов', $rating->reviews_count, ['count' => $rating->reviews_count]) }}

@endif
@if ($reviews->isEmpty())

Отзывов пока нет. Забронируйте стол — после визита сможете оставить первый.

@else {{-- Гистограмма помогает понять разброс оценок, а не только среднее --}} @if ($hasRating)
    @foreach ($rating->distribution() as $stars => $count)
  • {{ $stars }} ★ {{ $count }}
  • @endforeach
@endif
@foreach ($reviews as $review) @endforeach
{{ $reviews->withQueryString()->links() }}
@endif
@if ($similar->isNotEmpty())

Похожие заведения

@foreach ($similar as $item) @endforeach
@endif
@endsection