<?php

use App\Http\Controllers\Admin\AdminController;
use App\Http\Controllers\RegistrasiController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::get('/', [RegistrasiController::class,'create'])->name('user.create');
Route::post('/store', [RegistrasiController::class,'store'])->name('user.store');

Route::get('/home', [AdminController::class,'index'])->name('admin.home');
Route::get('/user', [AdminController::class, 'index_user'])->name('admin.index_user');
Route::get('/kegiatan', [AdminController::class, 'index_workshop'])->name('admin.index_kegiatan');
Route::put('/updatekegiatan/{id}', [AdminController::class, 'update_workshop'])->name('admin.update_kegiatan');
Route::get('/deletekegiatan/{id}', [AdminController::class, 'delete_workshop'])->name('admin.delete_kegiatan');

Route::get('/peserta', [AdminController::class, 'index_peserta'])->name('admin.index_peserta');
Route::get('/download_peserta', [AdminController::class, 'download_peserta'])->name('admin.download_peserta');
Route::get('/delete_participant/{id}', [AdminController::class, 'delete_participant'])->name('admin.delete_peserta');
