pintu2/routes/web.php

59 lines
2.7 KiB
PHP
Raw Normal View History

2024-02-27 22:53:57 +07:00
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AdminController;
use App\Http\Controllers\UserController;
use App\Http\Controllers\LayananPengajuanDpuDpaController;
use App\Http\Controllers\MahasiswaController;
2024-03-02 18:06:48 +07:00
use App\Http\Controllers\SesiLoginController;
2024-02-27 22:53:57 +07:00
/*
|--------------------------------------------------------------------------
| 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!
|
*/
2024-03-02 18:06:48 +07:00
Route::get('/layanan-dpudpa/tambah', [LayananPengajuanDpuDpaController::class, 'tambah'])->name('layanan-dpudpa.tambah');
Route::post('/layanan-dpudpa/tambah', [LayananPengajuanDpuDpaController::class, 'store'])->name('layanan-dpudpa.store');
Route::middleware(['guest'])->group(function () {
route::get('/admin/login',[SesiLoginController::class, 'login'])->name('login');
route::post('/admin/login',[SesiLoginController::class, 'ceklogin'])->name('admin.ceklogin');
});
Route::get('/home', function(){
return redirect('/admin');
});
Route::middleware(['auth'])->group( function () {
Route::get('/admin', [AdminController::class, 'index'])->name('admin.dashboard');
Route::get('/admin/logout', [SesiLoginController::class, 'logout'])->name('admin.logout');
Route::get('/admin/layanan-dpudpa', [LayananPengajuanDpuDpaController::class, 'index'])->name('layanan-dpudpa.index');
2024-02-27 22:53:57 +07:00
//User
2024-03-02 18:06:48 +07:00
Route::get('/admin/users', [UserController::class, 'index'])->name('users.index');
Route::POST('/admin/users', [UserController::class, 'store'])->name('users.store');
Route::PUT('/admin/users', [UserController::class, 'update'])->name('users.update');
Route::DELETE('/admin/users', [UserController::class, 'destroy'])->name('users.destroy');
2024-02-27 22:53:57 +07:00
//Mahasiswa
2024-03-02 18:06:48 +07:00
Route::get('/admin/mahasiswa', [MahasiswaController::class, 'index'])->name('mahasiswa.index');
Route::POST('/admin/mahasiswa', [MahasiswaController::class, 'store'])->name('mahasiswa.store');
Route::PUT('/admin/mahasiswa', [MahasiswaController::class, 'update'])->name('mahasiswa.update');
Route::DELETE('/admin/mahasiswa', [MahasiswaController::class, 'destroy'])->name('mahasiswa.destroy');
2024-02-27 22:53:57 +07:00
//User Roles
2024-03-02 18:06:48 +07:00
Route::get('/admin/users-roles', [UserController::class, 'userroles_index'])->name('users-roles.index');
Route::POST('/admin/users-roles', [UserController::class, 'userroles_store'])->name('users-roles.store');
Route::POST('/admin/users-roles/assign', [UserController::class, 'userroles_assign'])->name('users-roles.assign');
2024-02-27 22:53:57 +07:00
});