@extends('backend.master_structure') @section('content') @php use App\DashboardModel; $session_id = session()->get('session_id'); $member_data_instance = new DashboardModel(); $member_data = $member_data_instance->get_member_data($session_id); $user_id = $member_data->user_id; @endphp

Profile Statistics

{{--
Select one year for display the data : {{-- @php $currentYear = date('Y'); $previousYear = $currentYear - 1; @endphp
--}}
@foreach(range(1, 12) as $month) @endforeach
Month Profile Views Phone Number Post Views Facebook Website Contact Form
{{ strtoupper(date('M', mktime(0, 0, 0, $month, 1))) }} {{ $data['Profile'][$month - 1] > 0 ? $data['Profile'][$month - 1] : '-' }} {{ $data['PhoneNumber'][$month - 1] > 0 ? $data['PhoneNumber'][$month - 1] : '-' }} {{ $data['View Post'][$month - 1] > 0 ? $data['View Post'][$month - 1] : '-' }} {{ $data['Facebook'][$month - 1] > 0 ? $data['Facebook'][$month - 1] : '-' }} {{ $data['Website'][$month - 1] > 0 ? $data['Website'][$month - 1] : '-' }} {{ $data['Contact Form'][$month - 1] > 0 ? $data['Contact Form'][$month - 1] : '-' }}
Total {{ array_sum($data['Profile']) }} {{ array_sum($data['PhoneNumber']) }} {{ array_sum($data['View Post']) }} {{ array_sum($data['Facebook']) }} {{ array_sum($data['Website']) }} {{ array_sum($data['Contact Form']) }}
@endsection