name('home'); Route::middleware(['auth', 'verified'])->group(function () { Route::get('dashboard', [StoreController::class, 'index'])->name('dashboard'); Route::get('stores/create', [StoreController::class, 'create'])->name('stores.create'); Route::post('stores', [StoreController::class, 'store'])->name('stores.store'); Route::get('stores/{slug}', [StoreController::class, 'show'])->name('stores.show'); Route::get('stores/{slug}/preview', [StoreDesignController::class, 'preview'])->name('stores.preview'); Route::get('stores/{slug}/preview/shop', [StoreDesignController::class, 'shop'])->name('stores.preview.shop'); Route::get('stores/{slug}/preview/products/{productSlug}', [StoreDesignController::class, 'product'])->name('stores.preview.product'); Route::get('stores/{slug}/products', [ProductController::class, 'index'])->name('stores.products.index'); Route::get('stores/{slug}/products/create', [ProductController::class, 'create'])->name('stores.products.create'); Route::post('stores/{slug}/products', [ProductController::class, 'store'])->name('stores.products.store'); Route::get('stores/{slug}/products/{product}/edit', [ProductController::class, 'edit'])->name('stores.products.edit')->whereNumber('product'); // Saving uses POST, not PUT, because browsers can only upload files with POST. Route::post('stores/{slug}/products/{product}', [ProductController::class, 'update'])->name('stores.products.update')->whereNumber('product'); Route::delete('stores/{slug}/products/{product}', [ProductController::class, 'destroy'])->name('stores.products.destroy')->whereNumber('product'); Route::delete('stores/{slug}/products/{product}/images/{image}', [ProductController::class, 'destroyImage'])->name('stores.products.images.destroy')->whereNumber(['product', 'image']); Route::post('stores/{slug}/generate', [StoreGenerationController::class, 'generate'])->name('stores.generate'); Route::post('stores/{slug}/edits', [StoreGenerationController::class, 'edit'])->name('stores.edits'); }); require __DIR__.'/settings.php';