@include('navbar')
Visits
@php $totalVisitors = \Shetabit\Visitor\Models\Visit::query()->distinct('ip')->count('ip'); @endphp
{{$totalVisitors}}
Humans
@php $humans = \App\Models\RealVisit::query()->distinct('ip')->count('ip'); @endphp
{{$humans}}
Bots
{{$totalVisitors-$humans}}
@foreach(\Shetabit\Visitor\Models\Visit::query()->distinct()->get(['platform']) as $platform)
{{$platform->platform}}
{{\Shetabit\Visitor\Models\Visit::query()->where('platform',$platform->platform)->distinct('ip')->count('ip')}}
@endforeach
IP
User Type
User Agent
Reason/ISP
Url Visited
Browser
Platform
Time
@php $visitors = \Shetabit\Visitor\Models\Visit::query()->groupBy(['ip'])->latest()->limit(300)->paginate(20); @endphp @foreach($visitors as $data)
@php $typeUser = \App\Models\RealVisit::query()->where('ip',$data->ip)->count() && !(bool)\App\Models\Blacklist::query()->where('ip',$data->ip)->count()?"
Human
":"
Bot
"; $reason= \App\Models\Blacklist::query()->where('ip',$data->ip)->first()?->provider??'Not found'; $url = $data->url; $path = parse_url($url, PHP_URL_PATH); @endphp
{{$data->ip}}
{!! $typeUser !!}
{{$data->useragent}}
{!! $reason !!}
{{$path}}
{{$data->browser}}
{{$data->platform}}
{{$data->created_at}}
@endforeach
{!! $visitors->render() !!}