rsabhk_hsr/app/Http/Controllers/DashboardController.php
2025-04-27 22:23:31 +07:00

21 lines
470 B
PHP

<?php
namespace App\Http\Controllers;
use App\Models\Pasien;
use App\Models\Registrasi;
use App\Models\Transaksi;
use Illuminate\Http\Request;
class DashboardController extends Controller
{
public function index()
{
$totalTransaki = Transaksi::sum('total');
$totalPasien = Pasien::count();
$totalRegistrasi = Registrasi::count();
return view('dashboard', compact(['totalTransaki', 'totalPasien', 'totalRegistrasi']));
}
}