<?php
namespace App\Http\Controllers;

use App\Models\Pendaftaran;

class LandingController extends Controller
{
    public function index()
    {
        $grafikPendaftaran = Pendaftaran::select('jurusan')
            ->selectRaw('COUNT(*) as total_pendaftaran')
            ->groupBy('jurusan')
            ->orderBy('jurusan')
            ->get();

        return view('index', compact('grafikPendaftaran'));
    }
}
