Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Update Dashboard.php
Browse files Browse the repository at this point in the history
  • Loading branch information
galihap76 authored Jun 21, 2023
1 parent 5cba81b commit e94618b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Http/Livewire/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ class Dashboard extends Component
{
public function render()
{
// Menghitung total semua mahasiswa
$total_semua_mahasiswa = MahasiswaModel::count();

// Menghitung total mahasiswa yang statusnya aktif
$total_mahasiswa_aktif = MahasiswaModel::where('status', '=', 'aktif')->count();

// Menghitung total mahasiswa yang statusnya tidak aktif
$total_mahasiswa_tidak_aktif = MahasiswaModel::where('status', '=', 'tidak aktif')->count();

// Mengembalikan tampilan livewire.dashboard dengan data yang diperlukan
return view(
'livewire.dashboard',
[
Expand Down

0 comments on commit e94618b

Please sign in to comment.