@php use App\Models\Business; $userDetail=\Auth::user() ?? ""; if(Auth::User()->userTypeId==1){ $profileImage=$userDetail->getUserDetail->profileImageUrl ?? ""; }else{ $profileImage=$userDetail->getBusinessDetail->logoImageUrl ?? ""; } $profileUrl='https://hapiverse.com/'.$profileImage; @endphp
@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

{{\Carbon\Carbon::parse($story->first()->posted_date)->diffForhumans()}}

@endforeach