<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\PertanyaanController;
use App\Http\Controllers\KonsultasiController;
use App\Http\Controllers\Konsultasi2Controller;

use App\Http\Controllers\LaporanController;
use App\Http\Controllers\LoginController;
use App\Http\Controllers\RegisterController;


/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::get('/tentang', function () {
    return view('tentang');
});

Route::get('/pustakawan', function () {
    return view('pustakawan');
});

Route::get('/panduan', function () {
    return view('panduan');
});

Route::get('/berita', function () {
    return view('berita');
});

Route::get('/kontak', function () {
    return view('kontak');
});


Route::resource('/admin/pertanyaan', PertanyaanController::class);
Route::resource('/admin/konsultasi', KonsultasiController::class); 
Route::resource('/admin/konsultasi2', Konsultasi2Controller::class); 


Route::resource('/admin/laporan', LaporanController::class);

Route::get('/login', [LoginController::class, 'index']);
Route::post('/login', [LoginController::class, 'authenticate']);

Route::resource('/register', RegisterController::class);

