<?php

namespace App\Http\Controllers\Backend;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class AuditoryController extends Controller
{
    public function index()
    {
        // Ambil data materi berdasarkan id_style = 2 (Auditory)
        $materi = DB::table('materi')
            ->where('id_style', 2)
            ->orderBy('id_materi')
            ->select('id_materi', 'konten', 'audio', 'teks')
            ->get();

        return view('backend.materi.' . $bladeMap[$style]);

    }
}
