{!! Theme::section('community.pannel.visitors.menu',['subpage'=>'geographics']) !!}
{!! Theme::section('community.pannel.visitors.geographic-menu',['subpage'=>'countries']) !!} @php $communityId = isset($community) && $community ? (int) $community->id : 0; $names = is_array($geographicCountriesNames ?? null) ? $geographicCountriesNames : []; $namesForHash = $names; sort($namesForHash, SORT_STRING); $svgCacheKey = $communityId > 0 ? ('vis_geo_svg_c' . $communityId . '_h' . md5(implode('|', $namesForHash))) : null; $svgCached = $svgCacheKey ? \Cache::get($svgCacheKey) : null; @endphp
@if($svgCached) {!! $svgCached !!} @else @php $geographicCountriesLookup = array_fill_keys($names, true); ob_start(); @endphp @php $svgHtml = ob_get_clean(); if ($svgCacheKey) { \Cache::put($svgCacheKey, $svgHtml, now()->addHours(6)); } echo $svgHtml; @endphp @endif
Countries
Name Visitors ({{$uniqueVisitorsCount}})
@if($geographicCountries) @foreach($geographicCountries as $data)
@if($data->value) {{$data->value}} @else Unknown @endif