@extends('app') @php use Illuminate\Support\Facades\Storage; @endphp @section('content')

{{ $professional->specialistInfo->company_name }}

{{ $averageRating }} @for ($i = 1; $i <= 5; $i++) @endfor
Отзывов: {{ $professional->reviews->filter(function($review) { return !empty($review->reviews); // Проверьте, что текст отзыва не пустой })->count() }}

{{ $professional->category }}

@if(!auth()->check() || (auth()->check() && auth()->user()->id !== (int)$specialistId))
@livewire('users', ['specialistId' => $specialistId])
@endif
О нас
Контакты
Награды
Отзывы
@if ($professional->specialistInfo->professional_info)

О нас:

{!! nl2br(e($professional->specialistInfo->professional_info ?? '')) !!}
@endif @if ($professional->specialistInfo->description)

Предоставляемые услуги:

{!! nl2br(e($professional->specialistInfo->description ?? '')) !!}
@endif

Проектов: {{$professional->projects->count()}}

@foreach($professional->projects->take(4) as $pro) @php $coverImage = $pro->images()->where('is_cover', true)->first(); @endphp @endforeach
@if($professional->projects->count()>4)
@endif

Контакты

@if($professional->specialistInfo->vkontakte || $professional->specialistInfo->instagram || $professional->specialistInfo->telegram || $professional->specialistInfo->website)

Контактное лицо

@if($professional->specialistInfo->vkontakte) @endif @if($professional->specialistInfo->instagram) @endif @if($professional->specialistInfo->telegram) @endif @if($professional->specialistInfo->website) @endif
@endif @if ($professional->specialistInfo->price)

Цены

{{ $professional->specialistInfo->price}}

Средний, ниже среднего

@endif @if ($professional->specialistInfo->phone) @endif @if ($professional->specialistInfo->address)

Адрес

{{ $professional->specialistInfo->address}}

@endif
@if ($professional->specialistInfo->diploma)

Награды

{!! nl2br(e($professional->specialistInfo->diploma ?? '')) !!}

@endif @if ($professional->specialistInfo->pricePolitic)

Политика ценообразования

{!! nl2br(e($professional->specialistInfo->pricePolitic ?? '')) !!}

@endif

Отзывов о: {{$professional->specialistInfo->company_name ?? $professional->name}} - {{ $professional->reviews->filter(function($review) { return !empty($review->reviews); // Проверьте, что текст отзыва не пустой })->count() }}

@if(!auth()->check() || (auth()->check() && auth()->user()->id !== (int)$specialistId)) @endif
{{ request()->sort == 'oldest' ? 'В начале старые' : 'В начале новые' }}
@for ($i = 1; $i <= 5; $i++) @endfor
{{ $averageRating }} @php $textReviws = 'отзывов'; if(count($reviews) == 1){ $textReviws = 'отзыв'; } else if(count($reviews) == 2 || count($reviews) == 3 || count($reviews) == 4){ $textReviws = 'отзыва'; } else if(count($reviews) <= 5){ $textReviws = 'отзывов'; } @endphp ({{count($reviews)}} {{$textReviws}}) {{--
{{ $averageRating }}
--}}

Качество работы

{{ number_format($averageProfessionalism, 1) }}

Коммуникация

{{ number_format($averageTimeliness, 1) }}

Стоимость

{{ number_format($averageCost, 1) }}
@php $month_list = array( 1 => 'января', 2 => 'февраля', 3 => 'марта', 4 => 'апреля', 5 => 'мая', 6 => 'июня', 7 => 'июля', 8 => 'августа', 9 => 'сентября', 10 => 'октября', 11 => 'ноября', 12 => 'декабря' ); $reviewsToShow = $reviews->take(10); $totalReviewsCount = isset($totalReviews) ? $totalReviews : $reviews->count(); @endphp @foreach($reviewsToShow as $review) {{-- @if($review->reviews)--}}
avatar

{{ $review->user->name }}

{{-- @dd($review) --}}

@for($i = 1; $i <= 5; $i++) @endfor

{{ $review->reviews }}

@php $oldDate = $review->created_at->format('d m Y'); $actualM = $month_list[$review->created_at->format('n')]; @endphp

{{ $review->created_at->format('d') .' '. $actualM .' '. $review->created_at->format('Y') }}

@if(mb_strlen($review->reviews) > 200) @endif
{{-- @endif--}} @endforeach
@if($totalReviewsCount > 10)
@endif
@php if(!isset($city)){ if(session('city')){ $city = session('city'); }elseif(session('cityGeo')){ $city = session('cityGeo'); }else{ $city = 'Москва'; } } if(!isset($slug)){ if(session('slug')){ $slug = session('slug'); }elseif(session('cityGeo')){ $slug = session('cityGeo'); }elseif($slug = \App\Models\City::where('title',$city)->first()){ $slug = $slug->slug; }else{ $slug = 'moskva'; } } @endphp @if ($similarSpecialists->isNotEmpty())

@if(isset($categoryName) && $categoryName) {{ mb_ucfirst(mb_strtolower($categoryName)) }} в {{ $declinedCity ?? 'Москве' }} @else Специалисты в {{ $declinedCity ?? 'Москве' }} @endif

{{--

Опытные специалисты для решения ваших задач

--}}
@foreach($similarSpecialists->take(10) as $professional)
Miniature Profile

{{ $professional->specialistInfo->company_name }}

@for ($i = 1; $i <= 5; $i++) @endfor ({{ $professional->averageRating }})

{{ \App\Helpers\CategoryHelper::getCategory(trim($professional->specialistInfo->category)) }}
{{ $professional->specialistInfo->city->title ?? $professional->specialistInfo->city ?? 'Город не указан' }}

@if(isset($professional->specialistInfo->slug) && $professional->specialistInfo->slug) Посмотреть профиль @endif
@endforeach
@endif {{--
@if($professional->specialistInfo->workGeography)

{{$professional->specialistInfo->sub_category}} рядом с {{ $professional->specialistInfo->workGeography }}

@foreach ($similarSpecialists as $similarSpecialist)

@if(isset($similarSpecialist->specialistInfo->slug) && $similarSpecialist->specialistInfo->slug) {{ $similarSpecialist->specialistInfo->company_name }} @endif

@endforeach @endif
@if($professional->specialistInfo->workGeography)

Категории профессионалов в {{ $professional->specialistInfo->workGeography }}

@foreach ($similarSpecialists as $similarSpecialist)

@if(isset($similarSpecialist->specialistInfo->slug) && $similarSpecialist->specialistInfo->slug) {{ \App\Helpers\CategoryHelper::getCategory(trim($similarSpecialist->specialistInfo->category)) }} @endif

@endforeach
@endif
--}} @php $settings = App\Models\Setting::first(); $cat_full = \App\Models\Category::with('categories')->get(); $categories = $cat_full->whereIn('id', $settings->categories); @endphp
Другие специалисты рядом
@foreach($cat_full->whereIn('id',[1,2,3,4]) as $cat) @endforeach
{{-- --}} @endsection