@if(@notify() !== null) @php $not=array(); $meme_id = ''; $action_type = ''; $counter=0; $a=array(); @endphp @foreach(@notify() 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++; $array[$key1]['status'] = 'Done'; $a[] = $key1; @endphp @endif @endif @endforeach @else @continue @endif
@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')