43 lines
1.4 KiB
PHP
43 lines
1.4 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Controllers\AuthController;
|
|
use App\Http\Controllers\WakilKepalaController;
|
|
use App\Http\Controllers\SiswaController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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('/', function () {
|
|
return view('home');
|
|
});
|
|
|
|
Route::get('/home', function () {
|
|
return view('home'); // Ganti 'welcome' dengan nama file blade yang sesuai
|
|
})->name('home');
|
|
|
|
Route::get('/ekstrakurikuler', function () {
|
|
return view('ekstrakurikuler'); // Ganti 'ekstrakurikuler' dengan nama file blade yang sesuai
|
|
})->name('ekstrakurikuler');
|
|
|
|
|
|
Route::get('/login', [AuthController::class, 'showLoginForm'])->name('login');
|
|
|
|
Route::post('/login', [AuthController::class, 'login']);
|
|
|
|
Route::middleware(['auth', 'role:wakil_kepala'])->group(function () {
|
|
Route::get('/wakil_kepala/dashboard', [WakilKepalaController::class, 'dashboard'])->name('wakil_kepala.dashboard');
|
|
});
|
|
|
|
Route::middleware(['auth', 'role:siswa'])->group(function () {
|
|
Route::get('/siswa/dashboard', [SiswaController::class, 'dashboard'])->name('siswa.dashboard');
|
|
});
|