name('home'); Route::inertia('/documentation/deployment', 'documentation/deployment')->name('documentation.deployment'); Route::get('/checkout/{order}', [CheckoutController::class, 'show'])->name('checkout.show'); Route::get('/checkout/{order}/return', [CheckoutController::class, 'returned'])->name('checkout.return'); Route::post('/checkout/{order}/retry', [CheckoutController::class, 'retry'])->middleware('throttle:5,1')->name('checkout.retry'); Route::post('/payments/{gateway}/callback', PaymentWebhookController::class)->middleware('throttle:120,1')->name('payments.webhook'); Route::get('/downloads/self-hosted', function () { $package = collect(glob(base_path('dist/radiq-ndm-self-hosted-*.zip')))->sortDesc()->first(); abort_unless($package && is_file($package), 404, 'Paket self-hosted belum tersedia.'); return response()->download($package, basename($package)); })->middleware('throttle:10,1')->name('downloads.self-hosted'); Route::middleware(['auth', 'verified'])->group(function () { Route::get('dashboard', DashboardController::class)->name('dashboard'); Route::get('billing', [BillingController::class, 'index'])->name('billing.index'); Route::post('billing/checkout', [BillingController::class, 'store'])->middleware('throttle:5,1')->name('billing.checkout'); Route::resource('devices', DeviceController::class); Route::resource('devices.credentials', DeviceCredentialController::class)->only(['store', 'update', 'destroy']); Route::resource('device-users', DeviceAccessUserController::class)->parameters(['device-users' => 'deviceAccessUser'])->except('show'); Route::post('device-user-assignments/{assignment}/sync', DeviceUserSyncController::class)->middleware('throttle:12,1')->name('device-user-assignments.sync'); Route::put('device-policy', TenantDevicePolicyController::class)->name('device-policy.update'); Route::get('device-settings', [TenantDeviceSettingController::class, 'edit'])->name('device-settings.edit'); Route::put('device-settings', [TenantDeviceSettingController::class, 'update'])->name('device-settings.update'); Route::post('device-settings/reveal-password', RevealTenantBasePasswordController::class)->middleware('throttle:3,10')->name('device-settings.reveal-password'); Route::post('device-settings/rotate-key', TenantEncryptionController::class)->middleware('throttle:2,10')->name('device-settings.rotate-key'); Route::post('devices/{device}/activate', DeviceActivationController::class)->middleware('throttle:6,1')->name('devices.activate'); Route::prefix('administration')->name('administration.')->group(function () { Route::get('billing-orders', [BillingOrderController::class, 'index'])->name('billing-orders.index'); Route::patch('billing-orders/{order}/approve', [BillingOrderController::class, 'approve'])->name('billing-orders.approve'); Route::resource('tenants', TenantController::class)->except('show'); Route::prefix('tenants/{tenant}')->middleware('admin.tenant')->scopeBindings()->group(function () { Route::resource('users', UserController::class)->except('show'); Route::put('users/{user}/password', [UserController::class, 'resetPassword'])->name('users.password'); Route::patch('users/{user}/toggle-active', [UserController::class, 'toggleActive'])->name('users.toggle-active'); }); }); }); require __DIR__.'/settings.php';