tag berita
This commit is contained in:
parent
652b6c9f76
commit
48f525e8fc
|
|
@ -10,10 +10,8 @@
|
|||
class IndexController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
{
|
||||
$tahun = date('Y');
|
||||
|
||||
// Ambil data sampah per bulan
|
||||
$dataSampah = Sampah::where('tahun', $tahun)
|
||||
->orderBy('bulan')
|
||||
->get();
|
||||
|
|
@ -32,7 +30,6 @@ public function index()
|
|||
$sisa[] = $d->sisa_sampah;
|
||||
}
|
||||
|
||||
// Rekap total satu tahun
|
||||
$rekap = [
|
||||
'timbulan' => array_sum($timbulan),
|
||||
'kelola' => array_sum($kelola),
|
||||
|
|
@ -40,10 +37,8 @@ public function index()
|
|||
'sisa' => array_sum($sisa),
|
||||
];
|
||||
|
||||
// Data sampah terbaru untuk card
|
||||
$sampah = Sampah::orderBy('tahun', 'desc')->first();
|
||||
|
||||
// Data TPS
|
||||
$kategoriTps = KategoriTps::orderBy('id_kategori_tps')->get();
|
||||
$tps = LokasiTps::all();
|
||||
|
||||
|
|
@ -66,5 +61,5 @@ public function index()
|
|||
'rekap',
|
||||
'tahun'
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@
|
|||
<nav class="breadcrumbs">
|
||||
<ol>
|
||||
<li><a href="{{ route('user.index') }}">Beranda</a></li>
|
||||
<li><a href="{{ route('user.berita') }}">Berita</a></li>
|
||||
<li class="current">Detail Berita</li>
|
||||
<li class="current"><a href="{{ route('user.berita') }}">Berita</a></li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue