@extends('includes.layout') @section('content')
...

@if($artist->type == 1) Saloon @elseif($artist->type == 2) Artist @else Unknown Type @endif

{{ ucwords($artist->name) }}

{{-- ucwords($artist->name) --}}

@if (isset($artist->bio) && !empty($artist->bio))

Bio

{{ $artist->bio }}

@endif

Skill

@foreach ($artist->artist_services->unique('service_id') as $key => $service) {{ $service->services->name }} @endforeach
{{$happyClients}}+

Happy Clients

@php $averageRating = 0; // Initialize average rating to 0 if ($reviews->count() > 0) { $averageRating = $reviews->avg('rating'); } $averageRating = round($averageRating); @endphp
{{$averageRating}}

({{$reviews->count()}} Reviews)

@foreach ($artist->artist_services->unique('service_id') as $key => $service) @php $childs = App\Models\ArtistsServices::with('subservices') ->where('service_id', $service->service_id) ->where('user_id', $service->user_id) ->where('status', 1) ->get(); @endphp @if (count($childs) > 0)
    @foreach ($childs as $child) @php $user = Auth::user(); $cartService = null; if (!empty($user)) { $cartService = App\Models\CartServices::with('cart') ->whereHas('cart', function ($query) use ($user, $artist) { $query->where('user_id', $user->id)->where('vender_id', $artist->id); }) ->where('subservice_id', $child->subservice_id) ->first(); } $cartService = App\Models\CartServices::with('cart') ->where('subservice_id', $child->subservice_id) ->first(); @endphp
  • {{ ucwords($child->subservices->name) ?? 'No Service' }}

    ₹{{ $service->price }}
    Duration: {{ $child->duration }}
    @if($child->gender == 'M') Male @else Female @endif

    @if (Auth::check() && (Auth::user()->type == 1 || Auth::user()->type == 2)) @else
    @endif
  • @endforeach
@endif @endforeach

Photos

@foreach ($artist->gallery as $key => $item) @if($item->file_type == 'image')
@endif @endforeach

Videos

@foreach ($artist->gallery as $key => $item) @if($item->file_type == 'video')
@endif @endforeach
@php $userType = auth()->user()->type ?? null; // Assuming the user is authenticated @endphp @if ($userType !== "1" && $userType !== "2") Write Review @endif
Review
@php $averageRating = 0; // Initialize average rating to 0 if ($reviews->count() > 0) { $averageRating = $reviews->avg('rating'); } $averageRating = round($averageRating); @endphp @for ($i = 5; $i > 0; $i--) @php $checked=($i==(int)$averageRating)?'checked':''; @endphp @endfor

{{ $averageRating }} out of 5

@foreach ($artist->reviews as $review)
{{ ucwords($review->user->name) }}
@for ($i = 5; $i > 0; $i--) @php $checked=($i==(int)$averageRating)?'checked':''; @endphp @endfor

{{ $review->rating }}

{{ $review->comment }}

@endforeach
@endsection