<?php

namespace App\Http\Controllers\dashboard;

use App\Http\Controllers\Controller;
use App\Models\Tutor;
use App\Models\Siswa;
use App\Models\User;
use App\Models\Classification;

class Analytics extends Controller
{
  public function index()
  {
    $siswa = Siswa::all();
    $tutor = Tutor::all();
    $classification = Classification::join("siswa", "siswa.user_id", "=", "classification.user_id")->get();
    $users = User::where("role", "=", "Siswa")->get();
    return view('content.dashboard.dashboards-analytics', compact('siswa', 'tutor', 'users', 'classification'));
  }
}
