MIF_E31210063/MaidMatching/routes/web.php

65 lines
2.0 KiB
PHP

<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\FuncController;
/*
|--------------------------------------------------------------------------
| 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('/admin/auth/login', function () {
FuncController::check_user();
return view('auth.login');
})->name('login');
Route::get('/', function () {
return view('homepage');
})->name('homepage');
Route::prefix('dashboard')->group(function () {
// Rute untuk halaman utama dashboard
Route::get('/', function () {
$user = FuncController::get_profile();
return view('dashboard.main')->with('user', $user);
})->name('dashboard.index');
// Rute untuk halaman skill di dashboard
Route::get('/skill', function () {
$user = FuncController::get_profile();
return view('dashboard.skill')->with('user', $user);
})->name('dashboard.skill');
Route::get('/job', function () {
$user = FuncController::get_profile();
return view('dashboard.job')->with('user', $user);
})->name('dashboard.job');
Route::get('/owners', function () {
$user = FuncController::get_profile();
return view('dashboard.owners')->with('user', $user);
})->name('dashboard.owners');
Route::get('/maids', function () {
$user = FuncController::get_profile();
return view('dashboard.maids')->with('user', $user);
})->name('dashboard.maids');
Route::get('/admins', function () {
$user = FuncController::get_profile();
return view('dashboard.admins')->with('user', $user);
})->name('dashboard.admins');
Route::get('/account', function () {
$user = FuncController::get_profile();
return view('dashboard.account')->with('user', $user);
})->name('dashboard.account');
});