tag berita

This commit is contained in:
rahmagustin 2026-04-07 22:31:08 +07:00
parent 652b6c9f76
commit 48f525e8fc
2 changed files with 49 additions and 55 deletions

View File

@ -12,8 +12,6 @@ class IndexController extends Controller
public function index() public function index()
{ {
$tahun = date('Y'); $tahun = date('Y');
// Ambil data sampah per bulan
$dataSampah = Sampah::where('tahun', $tahun) $dataSampah = Sampah::where('tahun', $tahun)
->orderBy('bulan') ->orderBy('bulan')
->get(); ->get();
@ -32,7 +30,6 @@ public function index()
$sisa[] = $d->sisa_sampah; $sisa[] = $d->sisa_sampah;
} }
// Rekap total satu tahun
$rekap = [ $rekap = [
'timbulan' => array_sum($timbulan), 'timbulan' => array_sum($timbulan),
'kelola' => array_sum($kelola), 'kelola' => array_sum($kelola),
@ -40,10 +37,8 @@ public function index()
'sisa' => array_sum($sisa), 'sisa' => array_sum($sisa),
]; ];
// Data sampah terbaru untuk card
$sampah = Sampah::orderBy('tahun', 'desc')->first(); $sampah = Sampah::orderBy('tahun', 'desc')->first();
// Data TPS
$kategoriTps = KategoriTps::orderBy('id_kategori_tps')->get(); $kategoriTps = KategoriTps::orderBy('id_kategori_tps')->get();
$tps = LokasiTps::all(); $tps = LokasiTps::all();

View File

@ -11,8 +11,7 @@
<nav class="breadcrumbs"> <nav class="breadcrumbs">
<ol> <ol>
<li><a href="{{ route('user.index') }}">Beranda</a></li> <li><a href="{{ route('user.index') }}">Beranda</a></li>
<li><a href="{{ route('user.berita') }}">Berita</a></li> <li class="current"><a href="{{ route('user.berita') }}">Berita</a></li>
<li class="current">Detail Berita</li>
</ol> </ol>
</nav> </nav>
</div> </div>