@extends('front.layouts.app') @section('title', $astrologer->name . ' - Professional Astrologer') @section('content')
@if($astrologer->astrologerDetail && $astrologer->astrologerDetail->profile_pic) {{ $astrologer->name }} @else
@endif
@if($astrologer->isOnline())
Online
@else
Offline
@endif

{{ $astrologer->name }}

@if($astrologer->scategories->count() > 0)
{{ $astrologer->scategories->pluck('name')->implode(' • ') }}
@endif @if($astrologer->skills->count() > 0)
{{ $astrologer->skills->pluck('name')->implode(' • ') }}
@endif @if($astrologer->scategories->isEmpty() && $astrologer->skills->isEmpty())
Vedic Astrology
@endif
@if($astrologer->astrologerDetail && $astrologer->astrologerDetail->website_url) @endif

Rating

{{ number_format($astrologer->average_rating, 1) }}

Experience

{{ $astrologer->astrologerDetail->experience_years ?? 0 }}+ Yrs

Location

{{ $astrologer->astrologerDetail->city ?? 'India' }}@if($astrologer->astrologerDetail->state), {{ $astrologer->astrologerDetail->state->name }}@endif

Language

{{ $astrologer->languages->pluck('name')->implode(', ') ?: 'Hindi' }}

About Me

{!! nl2br(e($astrologer->astrologerDetail->bio)) ?: 'No bio available yet.' !!}

Education

    @php $educationRaw = is_string($astrologer->astrologerDetail->education) ? json_decode($astrologer->astrologerDetail->education, true) : ($astrologer->astrologerDetail->education ?? []); // If education is a list of IDs, try to resolve names if (!empty($educationRaw) && is_numeric($educationRaw[0] ?? null)) { $education = \App\Models\Qualification::whereIn('id', $educationRaw)->pluck('name')->toArray(); } else { $education = $educationRaw; } @endphp @forelse($education as $edu)
  • @if(is_array($edu)) {{ $edu['degree'] ?? ($edu['title'] ?? 'N/A') }} @else {{ $edu }} @endif
  • @empty
  • No education details listed.
  • @endforelse

Awards & Achievements

    @php $awards = is_string($astrologer->astrologerDetail->awards) ? json_decode($astrologer->astrologerDetail->awards, true) : ($astrologer->astrologerDetail->awards ?? []); @endphp @forelse($awards as $award)
  • @if(is_array($award)) {{ $award['title'] ?? ($award['name'] ?? 'Award') }} @else {{ $award }} @endif
  • @empty
  • No awards listed.
  • @endforelse

Certifications

    @php $certifications = is_string($astrologer->astrologerDetail->certifications) ? json_decode($astrologer->astrologerDetail->certifications, true) : ($astrologer->astrologerDetail->certifications ?? []); @endphp @forelse($certifications as $cert)
  • {{ $cert }}
  • @empty
  • No certifications listed.
  • @endforelse
@if($astrologer->poojaServices->where('status', true)->count() > 0)

Pooja Services offered by {{ $astrologer->name }}
{{ $astrologer->poojaServices->where('status', true)->count() }} Services

@foreach($astrologer->poojaServices->where('status', true) as $assignedService) @php $service = $assignedService->poojaService; $name = $assignedService->custom_name ?: ($service ? $service->name : 'Unknown Ritual'); $img = $assignedService->custom_image ? asset('storage/' . $assignedService->custom_image) : ($service && $service->image ? asset('storage/' . $service->image) : null); $price = $assignedService->price; @endphp
@if($img) @else
@endif
₹{{ number_format($price, 2) }}

{{ $name }}

{!! strip_tags($assignedService->description ?: ($service ? $service->description : 'Experience this sacred ritual performed by expert astrologers.')) !!}
@csrf
@endforeach
@endif @if($astrologer->astrologerDetail->intro_video_path)

Introduction Video

Source: {{ $astrologer->astrologerDetail->intro_video_path }}

@endif

Rating & Reviews

{{ number_format($astrologer->average_rating, 1) }}
@for($i = 1; $i <= 5; $i++) @endfor
{{ $astrologer->total_reviews }} Total Reviews
@php $reviewCounts = $astrologer->reviews()->approved() ->selectRaw('rating, count(*) as total') ->groupBy('rating') ->pluck('total', 'rating') ->toArray(); $totalReviews = $astrologer->total_reviews ?: 1; // Avoid division by zero @endphp @foreach(range(5, 1) as $star) @php $count = $reviewCounts[$star] ?? 0; $pct = ($count / $totalReviews) * 100; @endphp
{{ $star }} ★
{{ round($pct) }}%
@endforeach
@forelse($astrologer->reviews()->approved()->with('user')->latest()->get() as $review)
{{ substr($review->user->name, 0, 1) }}

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

@for($i = 1; $i <= 5; $i++) @endfor
{{ $review->created_at->diffForHumans() }}
@if($review->review)

{{ $review->review }}

@endif @if($review->tags && count($review->tags) > 0)
@foreach($review->tags as $tagKey) @php $tagLabel = \App\Models\AstrologerReview::getAvailableTags()[$tagKey] ?? $tagKey; @endphp {{ $tagLabel }} @endforeach
@endif @if($review->reply)
Astrologer's Response

{{ $review->reply }}

@endif
@empty

No reviews yet. Be the first to share your experience!

@endforelse

Chat with Assistant?

Need help picking an astrologer?

Available Today

10 AM - 10 PM IST

Fast Connection

Avg. response < 2 mins

@endsection @push('styles') @endpush @push('scripts') @vite(['resources/js/app.js']) @endpush