@include('user-web.layouts.sidebar')
{{__('msg.friends')}}
@foreach($friendDetail as $friend)
@foreach($friend as $friend)
@php
$table=$friend->getTable();
array_push($friendNames,$friend->userName );
@endphp
@if($friend->getTable() =='mstuser')
@php
$friendImage=$friend->profileImageUrl ?? '';
$url=env('APPLICATION_URL').$friendImage;
@endphp
@if(\Illuminate\Support\Facades\File::exists(public_path($friendImage)))
@else
@endif
@elseif($friend->getTable() =='mstbusiness')
@php
$busienssImage=$friend->logoImageUrl ?? '';
$urlBusiness=env('APPLICATION_URL').$busienssImage;
@endphp
@endif
@endforeach
@endforeach
@if($friend->getTable() =='mstuser')
@php
@endphp
{{$friend->userName ?? ''}}
{{$friend->address}}, {{$friend->country}}
View Profile
Unfriend
@elseif($friend->getTable() =='mstbusiness')
@php
@endphp
{{$friend->businessName ?? ''}} (Business)
{{$friend->UserCity->city}}, {{$friend->userCountry->country}}
View Profile
Unfriend
@endif
Friends Suggestions
@foreach($users as $user)
@php
if($user->userName == $loggedIn->userName){
continue;
}
if (in_array($user->userName, $friendNames))
{
continue;
}
@endphp
@endforeach
Business Suggestions
-
@foreach($businesses as $business)
@php
if($business->businessName == $loggedIn->userName){
continue;
}
if (in_array($business->businessName, $friendNames))
{
continue;
}
@endphp
- @endforeach