@extends('dashboard.layout') @section('content') @php $Date = date('Y-m-d',strtotime("-1 month")); $row = \DB::select("SELECT count(*) as `Counter` FROM `visitors` WHERE `visitors`.`browser`='Safari' and `visitors`.`robot`='0' and DATE(`visitors`.`created_at`) > ? ",[$Date]); $Safari = $row[0]->Counter; $row = \DB::select("SELECT count(*) as `Counter` FROM `visitors` WHERE `visitors`.`browser`='Firefox' and `visitors`.`robot`='0' and DATE(`visitors`.`created_at`) > ? ",[$Date]); $FireFox = $row[0]->Counter; $row = \DB::select("SELECT count(*) as `Counter` FROM `visitors` WHERE `visitors`.`browser`='Chrome' and `visitors`.`robot`='0' and DATE(`visitors`.`created_at`) > ? ",[$Date]); $Chrome = $row[0]->Counter; $row = \DB::select("SELECT count(*) as `Counter` FROM `visitors` WHERE `visitors`.`browser`='Opera' and `visitors`.`robot`='0' and DATE(`visitors`.`created_at`) > ? ",[$Date]); $Opera = $row[0]->Counter; $row = \DB::select("SELECT count(*) as `Counter` FROM `visitors` WHERE `visitors`.`browser`='Edge' and `visitors`.`robot`='0' and DATE(`visitors`.`created_at`) > ? ",[$Date]); $Edge = $row[0]->Counter; /**/ $row = \DB::select("SELECT count(*) as `Counter` FROM `visitors` WHERE `visitors`.`platform` = 'Windows' and `visitors`.`robot`='0' and DATE(`visitors`.`created_at`) > ? ",[$Date]); $Windows = $row[0]->Counter; $row = \DB::select("SELECT count(*) as `Counter` FROM `visitors` WHERE ( `visitors`.`platform` = 'Ubuntu' or `visitors`.`platform` = 'Linux' ) and `visitors`.`robot`='0' and DATE(`visitors`.`created_at`) > ? ",[$Date]); $Linux = $row[0]->Counter; $row = \DB::select("SELECT count(*) as `Counter` FROM `visitors` WHERE `visitors`.`platform`='OS X' and `visitors`.`robot`='0' and DATE(`visitors`.`created_at`) > ? ",[$Date]); $Mac = $row[0]->Counter; $row = \DB::select("SELECT count(*) as `Counter` FROM `visitors` WHERE `visitors`.`platform`='AndroidOS' and `visitors`.`robot`='0' and DATE(`visitors`.`created_at`) > ? ",[$Date]); $Android = $row[0]->Counter; $row = \DB::select("SELECT count(*) as `Counter` FROM `visitors` WHERE `visitors`.`platform`='IOS' and `visitors`.`robot`='0' and DATE(`visitors`.`created_at`) > ? ",[$Date]); $IOS = $row[0]->Counter; @endphp

{{DB::table('newsletter_subscribers')->whereDate('created_at', '>=', date('Y-m-d H:i:s',strtotime('-30 days')) )->count()}}

{{__('newsletter subscribers')}}

{{__('More info')}}

{{DB::table('notifications_subscribers')->whereDate('created_at', '>=', date('Y-m-d H:i:s',strtotime('-30 days')) )->count()}}

{{__('notifications subscribers')}}

{{__('More info')}}

{{App\User::whereDate('created_at', '>=', date('Y-m-d H:i:s',strtotime('-30 days')) )->count()}}

{{__('User Registrations')}}

{{__('More info')}}

{{DB::table('visitors')->where('robot','=','0')->whereDate('created_at', '>=', date('Y-m-d H:i:s',strtotime('-30 days')) )->count()}}

{{__('Unique Visitors')}}

{{__('More info')}}

{{__('latest posts')}}

{{App\Post::whereDate('created_at', '>=', date('Y-m-d H:i:s',strtotime('-30 days')) )->count()}} {{__('New Post')}}
    @forelse (\App\Post::latest()->limit(10)->get() as $post) @php $post->structure(); @endphp
  • {{$post->title}}
  • @empty
  • {{__('you have not added any post yet')}}
  • @endforelse

{{__('Latest Members')}}

{{App\User::whereDate('created_at', '>=', date('Y-m-d H:i:s',strtotime('-30 days')) )->count()}} {{__('New Members')}}
    @foreach (\App\User::latest()->limit(12)->get() as $user)
  • User Image {{$user->name}} {{$user->created_at->diffForHumans()}}
  • @endforeach

{{__('Browser Usage')}}

{{__('Platform Usage')}}

{{__('Visitors')}}

{{DB::table('visitors')->whereDate('created_at', '>=', date('Y-m-d H:i:s',strtotime('-30 days')) )->where('robot','=','0')->count()}} {{__('Visitors')}} ({{__('Last 30 Days')}})

{{ $percentage }}% {{__('Since last week')}}

{{__('This Week')}} {{__('Last Week')}}

{{__('Recent Activities')}}

@foreach (\UserActivity::list(10) as $activity)
{{$activity->created_at->diffForHumans()}}

{{$activity->name}} - {{$activity->body}}

@endforeach

{{__('To Do List')}}

    @forelse (DB::table('to_do_list')->where('user_id',\auth::user()->id)->limit(10)->get() as $task)
  • {{$task->body}} {{$task->status}}
  • @empty
  • {{__('you do not have any tasks')}}
  • @endforelse
@endsection