{{-- World Map --}} @if ($countries->isNotEmpty())

World Map

@endif {{-- Countries --}}

Visitors by Country

@if ($countries->isEmpty()) @else
@php $totalCountry = $countries->sum('visitors'); @endphp @foreach ($countries as $row) @endforeach
Country Visitors %
{{ $row->country }} {{ number_format($row->visitors) }} {{ $totalCountry > 0 ? round(($row->visitors / $totalCountry) * 100, 1) : 0 }}%
@endif
{{-- Cities --}}

Visitors by City

@if ($cities->isEmpty()) @else
@foreach ($cities as $row) @endforeach
City Region Country Visitors
{{ $row->city }} {{ $row->region }} {{ $row->country }} {{ number_format($row->visitors) }}
@endif