@extends($_layout . 'main')
{{-- khai báo title --}}
@section('title', 'Dashboard')
{{-- tên modul xuất hiện trong sub header --}}
@section('module.name', 'Dashboard')
@section('content')
STT |
Tên gian hàng |
Lượt view |
@foreach ($showroomStatistics as $showroom)
{{$loop->index+1}} |
{{$showroom->name}} |
{{$showroom->view_total}} |
@endforeach
@foreach ($merchantTemplates as $template)
@php
$p = crazy_arr($template->package_data);
@endphp
{{$template->template_name}} |
{{$p->price_format}} |
Hết hạn: {{date('d/m/Y', strtotime($template->expired_at))}} |
@endforeach
@endsection
@section('js')
{{-- --}}
@php
$data = [];
$detail = [];
$barColors = [];
$colorList = ['#ffac16', '#0b62a4'];
if ($statistics && count($statistics)) {
$data = $statistics;
foreach ($statistics as $i => $d) {
// $date = date('d/m/Y', strtotime($d['view_date']));
// $data[] = [$date, $d['view_total']];
$barColors[] = $colorList[$i % 2];
$detail[] = $d;
}
}
add_js_data('merchant_data', [
'statistics' => $data,
'table' => $detail,
'barColors' => $barColors
]);
@endphp
@endsection