@php use App\Models\Business; $userDetail=\Auth::user() ?? ""; if(Auth::User()->userTypeId==1){ $profileImage=$userDetail->getUserDetail->profileImageUrl ?? ""; }else{ $profileImage=$userDetail->getBusinessDetail->logoImageUrl ?? ""; } $profileUrl=env('APPLICATION_URL').$profileImage; @endphp
@if(\Illuminate\Support\Facades\File::exists(public_path($profileImage))) @else @endif
@foreach($stories as $story) @php if($story->first()->isBusiness == 1){ $user=Business::where('businessId',$story->first()->userId??"")->first(); $userId = $user->businessId; $url = $user->logoImageUrl; }else{ $url = $story->first()->user->profileImageUrl ?? ''; $userId= $story->first()->user->userId??''; } @endphp @endforeach