@foreach ($agents as $agent)
@php
$isOrder=$orders->where('user_id',$agent->id)->count();
@endphp
@if ($isOrder >0)
{{ $agent->name }}
{{ $agent->address }}
@if ($agent->icon_one && $agent->link_one)
@endif
@if ($agent->icon_two && $agent->link_two)
@endif
@if ($agent->icon_three && $agent->link_three)
@endif
@if ($agent->icon_four && $agent->link_four)
@endif
@endif
@endforeach
{{ $agents->links('user.paginator') }}