@extends('selfcheck.layouts.app') @section('title', 'Laporan — Log Activity') @section('page-title', 'Laporan — Log Activity') @section('content') @php // Helper sort-by kolom: klik header → toggle arah asc/desc (filter tetap terbawa). $sKey = request('sort') ?: 'date'; $sDir = request('dir') === 'asc' ? 'asc' : 'desc'; $sUrl = fn (string $key) => request()->fullUrlWithQuery(['sort' => $key, 'dir' => ($sKey === $key && $sDir === 'asc') ? 'desc' : 'asc']); $sMark = function (string $key) use ($sKey, $sDir) { if ($sKey !== $key) { return '↕'; } return $sDir === 'asc' ? '↑' : '↓'; }; @endphp
| No | Tanggal {!! $sMark('date') !!} | Total Aktivitas {!! $sMark('total') !!} | Aksi |
|---|---|---|---|
| {{ $loop->iteration }} | {{ $day['label'] }} | {{ $day['total'] }} | Lihat |