<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\User;

class TeacherController extends Controller
{
    public function index()
    {
        $teachers = User::where('role', 'teacher')
            ->with('teacherProfile.subject')
            ->get();

        return view('admin.teachers.index', compact('teachers'));
    }
}
