MIF_E31221322/routes/web.php

36 lines
1.3 KiB
PHP

<?php
use App\Http\Controllers\Auth\AuthenticatedSessionController;
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\ProfileController;
use Illuminate\Support\Facades\Route;
use SebastianBergmann\CodeCoverage\Report\Html\Dashboard;
/*
|--------------------------------------------------------------------------
| 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::middleware('guest')->group(function () {
Route::controller(AuthenticatedSessionController::class)->name('auth.')->group(function () {
Route::get('/', 'create')->name('login');
Route::post('/', 'store')->name('login_post');
});
});
Route::middleware('auth')->group(function () {
Route::post('/logout', [AuthenticatedSessionController::class, 'destroy'])->name('auth.logout');
Route::controller(DashboardController::class)->name('dashboard.')->group(function () {
Route::get('/dashboard-admin', 'admin')->name('admin');
Route::get('/dashboard-petugas', 'petugas')->name('petugas');
});
});