Untitled

mail@pastecode.io avatar
unknown
php
2 months ago
9.2 kB
0
Indexable
Never
<?php

/* FRONTOFFICE */
/* HALAMAN UTAMA */
Route::get('/', [LandingPageController::class, 'index'])->name('landingpage');

/* HALAMAN TRACER STUDY */
Route::get('/tracerstudy', [TracerStudyLandingPageController::class, 'index'])->name('tracerstudy');
Route::get('/tracerstudy/laporan', [TracerStudyLandingPageController::class, 'laporan'])->name('tracerstudy-laporan');
Route::get('/tracerstudy/statistik', [TracerStudyLandingPageController::class, 'statistik'])->name('tracerstudy-statistik');

/* PENGISIAN TRACER STUDY */
Route::prefix('tracerstudy/kuesioner')->name('kuesioner.')->group(function(){  
    
    Route::group(['middleware' => 'guest:alumni'], function () {
        Route::get('/login/{alias_url}', [AuthenticatedSessionControllerAlumni::class, 'create'])->name('tracerstudy-login.create');
        Route::post('/login/{alias_url}', [AuthenticatedSessionControllerAlumni::class, 'store'])->name('tracerstudy-login.store');
       
    });
 
    Route::group(['middleware' => 'auth:alumni'], function () {

        Route::get('/{alias_url}', [PengisianController::class, 'index'])->name('tracerstudy-pengisian.index');      
        Route::post('/{alias_url}/submit', [PengisianController::class, 'submit'])->name('tracerstudy-pengisian.form-submit');
        Route::post('/{alias_url}/check-influence', [PengisianController::class, 'checkInfluence'])->name('tracerstudy-pengisian.form-check-influence');
        Route::post('/{alias_url}/change-flag', [PengisianController::class, 'changeFlag'])->name('tracerstudy-pengisian.form-change-flag');
      
        Route::get('/{alias_url}/{nim}/logout', [PengisianController::class, 'finished'])->name('tracerstudy-pengisian.form-finished');
        Route::get('/logout/{alias_url}', [AuthenticatedSessionControllerAlumni::class, 'destroy'])->name('tracerstudy-login.destroy');

    });
});

/* BAKOFFICE */

/* GUEST */
Route::group(['middleware' => ['guest:web'],'RevalidateBackHistory'], function () {

    /* LOGIN */
    Route::get('/backoffic3', [AuthenticatedSessionController::class, 'create'])->name('login');
    Route::post('/backoffic3', [AuthenticatedSessionController::class, 'store']);

    /* RESET PASSWORD */        
    Route::get('/backoffic3/forgot-password', [PasswordResetLinkController::class, 'create'])->name('password.request');
    Route::post('/backoffic3/forgot-password', [PasswordResetLinkController::class, 'store'])->name('password.email');
    Route::get('/backoffic3/reset-password/{token}', [NewPasswordController::class, 'create'])->name('password.reset');
    Route::post('/backoffic3/reset-password', [NewPasswordController::class, 'store'])->name('password.update');

});
 
/* AUTHENTICATED */
Route::middleware(['auth:web'])->group(function () {
Route::prefix('backoffic3')->name('backoffice.')->group(function(){

    /* ROLE : ADMIN */
    Route::middleware('role:admin')->group(function () {

        
        /* USERS */
        Route::group(['prefix' => 'users'], function () {
            Route::resource('/users', UserController::class)->only(['index', 'create', 'store', 'destroy']);;
            Route::resource('/kelola-admin', KelolaAdminController::class);
            Route::resource('/kelola-admin-prodi', KelolaAdminProdiController::class);
            
        });
     
        /* DATABASE ALUMNI */
        Route::resource('/databasealumni', AlumniController::class)->only(['create', 'edit','store', 'update', 'destroy']);

        /* DATA MASTER */
        Route::group(['prefix' => 'datamaster'], function () {
            Route::resource('/jenjang', JenjangController::class);
            Route::resource('/fakultas', FakultasController::class);
       
            Route::group(['prefix' => 'alumni'], function () {
                Route::get('/reminder/create', [AlumniController::class, 'reminderCreate'])->name('reminder.create');
                Route::post('/reminder/store', [AlumniController::class, 'reminderStore'])->name('reminder.store');
                 Route::get('/blasting-ts/create', [AlumniController::class, 'blastingtsCreate'])->name('blastingts.create');
                Route::post('/blasting-ts/store', [AlumniController::class, 'blastingtsStore'])->name('blastingts.store');
             });

            Route::group(['prefix' => 'zona'], function () {
                Route::resource('/provinsi', ProvinsiController::class);
                Route::resource('/kabkota', KabKotaController::class);
           
            });

            Route::resource('/datapedia', DataPediaController::class);

            Route::group(['prefix' => 'datapedias'], function () {
                Route::get('/detail/{id_datapedia}', [DataPediaDetailController::class, 'index'])->name('datapediadetail.index');
                Route::get('/create/{id_datapedia}', [DataPediaDetailController::class, 'create'])->name('datapediadetail.create');
                Route::post('/store', [DataPediaDetailController::class, 'store'])->name('datapediadetail.store');
                Route::get('/edit/{id_datapedia}/{id}', [DataPediaDetailController::class, 'edit'])->name('datapediadetail.edit');
                Route::patch('/update/{id}', [DataPediaDetailController::class, 'update'])->name('datapediadetail.update');
                Route::delete('/destroy/{id}', [DataPediaDetailController::class, 'destroy'])->name('datapediadetail.destroy');
            
            });
        });

        /* EMAIL */
        Route::group(['prefix' => 'email'], function () {
            Route::resource('/template', EmailTemplateController::class);
            Route::resource('/outbox', EmailBoxController::class);
            Route::resource('/send', EmailSendController::class);
            Route::resource('/email-tracer-study', EmailBoxTSController::class);
        });

        /* REMINDER USE WHATSAPP */
        Route::prefix('whatsapp')->name('whatsapp.')->group(function () {
            Route::resource('/device', DeviceController::class);
            Route::resource('/outbox', OutboxController::class);
            Route::get('/whatsapp-outbox/delete-selected', [OutboxController::class, 'deletedSelected'])->name('deleted-selected-emailbox');
            Route::get('/device-scan/{id}', [ DeviceController::class, 'scanQR'])->name('device.scan');
            Route::post('/device-logout/{id}', [ DeviceController::class, 'logoutSession'])->name('device.logout');
        });
        

        /* TRACER STUDY */
        Route::group(['prefix' => 'tracer-study'], function () {

            Route::resource('/paket-soal', PaketSoalController::class)->only(['index', 'create', 'store', 'edit', 'update', 'destroy']);
           
            Route::group(['prefix' => 'paket-soal'], function () {
                Route::post('/menerima-usulan', [PaketSoalController::class, 'menerimaUsulan'])->name('paket-soal.menerima-usulan');
                Route::get('/{paketSoalId}/prodi', [PaketSoalController::class, 'showProdi'])->name('paket-soal.showProdi');
                Route::get('/{paketSoalId}/prodi/{kodeProdi}/pertanyaan', [PaketSoalController::class, 'showProdiForm'])->name('paket-soal.showProdiForm');
            });

            Route::resource('/laporan', LaporanTSController::class);   

        });

    });

     /* ROLE : ADMIN AND ADMIN PRODI */
    Route::middleware('role:admin|adminprodi')->group(function () {

        /*  DASHBOARD */
        Route::middleware('RevalidateBackHistory')->group(function () {
            Route::get('/dashboard', [HomeController::class, 'index'])->name('dashboard');
        });

        /*  DATABASE ALUMNI ONLY INDEX */
        Route::resource('/databasealumni', AlumniController::class)->only(['index']);

        /*  PAKET SOAL ONLY INDEX */
        Route::resource('/paket-soal', PaketSoalController::class)->only(['show']);

        /*  PERTANYAAN */
        Route::group(['prefix' => 'paket-soal'], function () {
            Route::get('/pertanyaan/{id}', [PertanyaanController::class, 'create'])->name('pertanyaan.create');
            Route::post('/pertanyaan/{id}/store', [PertanyaanController::class, 'store'])->name('pertanyaan.store');
            Route::get('pertanyaan/{id}/edit', [PertanyaanController::class, 'edit'])->name('pertanyaan.edit');
            Route::post('/pertanyaan/{id}/update', [PertanyaanController::class, 'update'])->name('pertanyaan.update');
        });

        /*  REKAP */
        Route::resource('/rekap', RekapTCController::class);
    
        /*  JAWABAN */
        Route::resource('/jawaban', JawabanTCController::class);

        /*  SHOW, EDIT, UPDATE PROFIL */
        Route::group(['prefix' => 'users'], function () {
            Route::resource('/users', UserController::class)->only(['show','edit', 'update']);
        });

         /*  STATISTIK */
        Route::prefix('statistik')->name('statistik.')->group(function(){
            Route::resource('/umum', StatistikUmumController::class);
            Route::resource('/per-pertanyaan', StatistikPerPertanyaanController::class);
      
        });

        /* LOGOUT */        
        Route::post('/logout', [AuthenticatedSessionController::class, 'destroy']) ->name('logout');

    });

   

   
});

});
Leave a Comment