<?php
 use App\Http\Controllers\Store\AuthController as StoreAuthController; use App\Http\Controllers\Store\BasketController as StoreBasketController; use App\Http\Controllers\Store\BillingAddressController as StoreBillingAddressController; use App\Http\Controllers\Store\DomainController as StoreDomainController; use App\Http\Controllers\Store\ProductController as StoreProductController; use Illuminate\Support\Facades\Route; Route::prefix('store')->name('api.store.')->middleware(['web', 'track.visitor', 'store.locale.visitor'])->group(function () { Route::get('/products/{product}/config-options', [StoreProductController::class, 'getConfigurableOptions'])->name('products.config-options'); Route::post('/products/{product}/calculate', [StoreProductController::class, 'calculate'])->middleware('throttle:20,1')->name('products.calculate'); Route::post('/domain/check', [StoreDomainController::class, 'check'])->middleware('throttle:20,1')->name('domain.check'); Route::get('/countries', [StoreAuthController::class, 'getCountries'])->name('countries'); Route::get('/cities/{country}', [StoreAuthController::class, 'getCities'])->name('cities'); Route::get('/kb/suggest', [\App\Http\Controllers\Store\KbSuggestController::class, 'suggest']) ->middleware('throttle:60,1')->name('kb.suggest'); Route::post('/basket/add', [StoreBasketController::class, 'add'])->name('basket.add'); Route::get('/basket/summary', [StoreBasketController::class, 'summary'])->name('basket.summary'); Route::put('/basket/{index}', [StoreBasketController::class, 'update'])->where('index', '[0-9]+')->name('basket.update'); Route::post('/basket/bulk-nameservers', [StoreBasketController::class, 'saveBulkNameservers'])->name('basket.bulk-nameservers'); Route::post('/basket/bulk-contacts', [StoreBasketController::class, 'saveBulkContacts'])->name('basket.bulk-contacts'); Route::get('/basket/default-domain-config', [StoreBasketController::class, 'getDefaultDomainConfig'])->name('basket.default-domain-config'); Route::post('/basket/apply-coupon', [StoreBasketController::class, 'applyCoupon'])->middleware('throttle:20,1')->name('basket.apply-coupon'); Route::delete('/basket/remove-coupon', [StoreBasketController::class, 'removeCoupon'])->name('basket.remove-coupon'); Route::get('/basket/discount-info', [StoreBasketController::class, 'getDiscountInfo'])->name('basket.discount-info'); Route::delete('/basket/{index}', [StoreBasketController::class, 'remove'])->where('index', '[0-9]+')->name('basket.remove'); Route::get('/billing-addresses', [StoreBillingAddressController::class, 'index'])->name('billing-addresses.index'); Route::get('/billing-addresses/{id}', [StoreBillingAddressController::class, 'show'])->name('billing-addresses.show'); Route::post('/billing-addresses', [StoreBillingAddressController::class, 'store'])->name('billing-addresses.store'); Route::put('/billing-addresses/{id}', [StoreBillingAddressController::class, 'update'])->name('billing-addresses.update'); Route::post('/billing-addresses/{id}/select', [StoreBillingAddressController::class, 'select'])->name('billing-addresses.select'); Route::delete('/billing-addresses/{id}', [StoreBillingAddressController::class, 'destroy'])->name('billing-addresses.destroy'); Route::post('/domain/search', [StoreDomainController::class, 'search'])->middleware('throttle:20,1')->name('domain.search'); Route::post('/domain/check', [StoreDomainController::class, 'check'])->middleware('throttle:20,1')->name('domain.check'); Route::get('/domain-extra-fields', [ \App\Http\Controllers\Store\Api\DomainExtraFieldsController::class, 'show', ])->name('domain-extra-fields'); Route::middleware('auth:client')->group(function () { Route::get('/domain/{domain}/renewal-options', [StoreDomainController::class, 'renewalOptions'])->name('domain.renewal-options'); Route::get('/my-domains', [StoreDomainController::class, 'myDomains'])->name('my-domains'); }); }); 