@if(@SeenNotify() !== null) @php $not=array(); $meme_id = ''; $action_type = ''; $counter=0; $a=array(); @endphp @foreach(@SeenNotify() as $n => $value) @if(!in_array($n,$a)) @php $meme_id=$value['meme_id']; $action_type=$value['type']; $user_id=$value['user_id']; @endphp @foreach (@notify() as $key1 => $value1) @if($value['comment_id']!=null) @if($value1['type']==$value['type'] && $value1['comment_id']==$value['comment_id'] && $value1['comment_parent_id'] == $value['comment_parent_id'] && $value1['meme_id']==$value['meme_id']) @php $counter++; $a[] = $key1; @endphp @elseif ($value1['type'] == $value['type'] && $value1['comment_id'] !== $value['comment_id'] && $value1['comment_parent_id'] !== $value['comment_parent_id'] && $value1['meme_id'] == $value['meme_id']) @php $counter++; $a[] = $key1; @endphp @endif @else @if($value1['type']==$value['type'] && $value1['meme_id']==$value['meme_id']) @php $counter++; $a[] = $key1; @endphp @endif @endif @endforeach @else @continue @endif
@if(@$value->user->avatar !== null) @else @endif @if($counter == 1) {{@$value->user->name}}{{' '.$action_type.'.'}} @endif @if($counter >= 2) @php $c=$counter-1; @endphp {{@$value->user->name}}{{' & ' .$c. ' other '.' '.$action_type.'.'}} @endif @if($counter == 0) {{@$value->user->name}}{{' '.$action_type.'.'}} @endif @if(@$value->meme->file_description == 'upload from pc') img @elseif(@$value->meme->file_description == 'from URL') img @endif
@if(@$value->created_at !== null) {{@$value->created_at->diffForHumans(null,true)}} @endif
@endforeach @endif