name('index'); Route::get('/rencana-aksi',[FrontController::class,'rencanaAksi'])->name('rencana-aksi'); Route::get('/artikel',[FrontController::class,'artikel'])->name('artikel'); Route::get('/edukasi',[FrontController::class,'edukasi'])->name('edukasi'); Route::get('forgotpass',[CustomLoginController::class,'forgotpass'])->name('forgotpass'); Route::post('forgotpass',[CustomLoginController::class,'forgotpass_post'])->name('forgotpass_post'); Route::get('login',[CustomLoginController::class,'index'])->name('login'); Route::post('login',[CustomLoginController::class,'post_login'])->name('post_login'); Route::post('get/subsektor',[AjaxController::class,'getSubsektor'])->name('getSubsektor'); Route::get('/user-manual', function () { return response()->file(public_path('user-manual.pdf')); }); Route::get('artisan/{command}', function ($command) { if (Auth::check() && Auth::user()->name === 'superadmin') { $commands = [ 'optimize-clear' => 'optimize:clear', 'storage-link' => 'storage:link', 'route-list' => 'route:list', 'config-cache' => 'config:cache', 'route-cache' => 'route:cache', 'schedule-run' => 'schedule:run', 'schedule-work' => 'schedule:work', 'schedule-stop' => 'schedule:stop' ]; if (array_key_exists($command, $commands)) { try { Artisan::call($commands[$command]); return "
" . Artisan::output() . ""; } catch (\Exception $e) { return response()->json(['error' => 'Command failed: ' . $e->getMessage()], 500); } } else { throw new NotFoundHttpException(); } } throw new NotFoundHttpException(); })->name('artisan'); // Auth::routes(); // Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); Route::middleware(['auth'])->name('modules.')->group(function () { include_route_files(__DIR__ . '/modules'); Route::get('logout',[CustomLoginController::class,'logout'])->name('logout'); });