@foreach ($saloons as $key=> $saloon)
@if($saloon->type == 1) @if($saloon->profile_photo_path) ... @else ... @endif @else @if($saloon->profile_photo_path) ... @else ... @endif @endif @php $user = Auth::user(); if(isset($user)){ if(App\Models\Favorites::where('saloon_id', $saloon->id)->where('user_id',$user->id)->where('is_fav',1)->exists()) { @endphp @php }else{ @endphp @php } }else{ @endphp @php } @endphp

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

@endforeach @if(count($saloons) > 0) {{$saloons->links()}} @endif