reportwidgets/AccessLogChartLine.php 1 location
|
@@ 89-93 (lines=5) @@
|
| 86 |
|
$user_rows[$user_id][$day] = [$timestamp, 1]; |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
if (isset($all[$day])) { |
| 90 |
|
$all[$day][1]++; |
| 91 |
|
} else { |
| 92 |
|
$all[$day] = [$timestamp, 1]; |
| 93 |
|
} |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
// transform user line to json |
reportwidgets/AccessLogChartLineAggregated.php 1 location
|
@@ 78-82 (lines=5) @@
|
| 75 |
|
$timestamp = strtotime($item->created_at) * 1000; |
| 76 |
|
$day = Carbon::createFromFormat('Y-m-d H:i:s', $item->created_at)->format('Y-m-d'); |
| 77 |
|
|
| 78 |
|
if (isset($all[$day])) { |
| 79 |
|
$all[$day][1]++; |
| 80 |
|
} else { |
| 81 |
|
$all[$day] = [$timestamp, 1]; |
| 82 |
|
} |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
// count accessess for each day |