@php // Remember what we have rendered $rendered = collect(); @endphp @foreach ($catalog as $o) @if($rendered->search($o->id)) @continue @endif @php($rendered->push($o->id)) @if (! ($d=$o->myduplicates()->get())->count()) @continue @else @foreach($d as $item) @if($rendered->search($item->id)) @continue @endif @php($rendered->push($item->id)) @endforeach @endif @endforeach
Remove Source
@include($o->type.'.widgets.thumbnail',['o'=>$o]) No other duplicates found? @include($item->type.'.widgets.thumbnail',['o'=>$item])