name('connections.')->group(function () { Route::get('/', [ConnectionsController::class, 'index'])->name('index'); Route::get('/test', [ConnectionsController::class, 'testConnections'])->name('test-connections'); }); // Categories routes Route::prefix('categories')->name('categories.')->group(function () { Route::get('/', [CategoriesController::class, 'index'])->name('index'); Route::get('/magento1', [CategoriesController::class, 'getMagento1Categories'])->name('magento1-categories'); Route::get('/magento1-tree', [CategoriesController::class, 'getMagento1CategoryTree'])->name('magento1-category-tree'); Route::get('/magento1-tree-with-products', [CategoriesController::class, 'getMagento1CategoryTreeWithProducts'])->name('magento1-category-tree-with-products'); Route::get('/magento2-tree', [CategoriesController::class, 'getMagento2CategoryTree'])->name('magento2-category-tree'); Route::get('/magento2-tree-with-products', [CategoriesController::class, 'getMagento2CategoryTreeWithProducts'])->name('magento2-category-tree-with-products'); Route::get('/m2-not-in-m1', [CategoriesController::class, 'getM2CategoriesNotInM1'])->name('m2-categories-not-in-m1'); Route::get('/m1-not-in-m2', [CategoriesController::class, 'getM1CategoriesNotInM2'])->name('m1-categories-not-in-m2'); Route::post('/{categoryId}/migrate', [CategoriesController::class, 'migrateCategory'])->name('migrate-category'); Route::delete('/{categoryId}', [CategoriesController::class, 'deleteCategory'])->name('delete-category'); Route::put('/{categoryId}/rename', [CategoriesController::class, 'renameCategory'])->name('rename-category'); }); // Migration routes Route::prefix('migration')->name('migration.')->group(function () { Route::get('/', [MigrationController::class, 'index'])->name('index'); Route::post('/migrate', [MigrationController::class, 'migrate'])->name('migrate'); }); // Attributes routes Route::prefix('attributes')->name('attributes.')->group(function () { Route::get('/', [AttributesController::class, 'index'])->name('index'); Route::post('/{attributeId}/migrate', [AttributesController::class, 'migrateAttribute'])->name('migrate-attribute'); Route::post('/group/{groupId}/{setId}/migrate', [AttributesController::class, 'migrateAttributeGroup'])->name('migrate-attribute-group'); }); // Products routes Route::prefix('products')->name('products.')->group(function () { Route::get('/', [ProductsController::class, 'index'])->name('index'); Route::post('/migrate', [ProductsController::class, 'migrateProducts'])->name('migrate-products'); Route::post('/migrate-options', [ProductsController::class, 'migrateProductOptions'])->name('migrate-product-options'); Route::post('/sync-categories', [ProductsController::class, 'syncProductCategories'])->name('sync-product-categories'); Route::post('/fix-category-products', [ProductsController::class, 'fixCategoryProducts'])->name('fix-category-products'); Route::delete('/{productId}', [ProductsController::class, 'deleteM2Product'])->name('delete-product'); Route::delete('/above-m1-max', [ProductsController::class, 'deleteM2ProductsAboveM1Max'])->name('delete-products-above-m1-max'); }); // Customers routes Route::prefix('customers')->name('customers.')->group(function () { Route::get('/', [CustomersController::class, 'index'])->name('index'); Route::post('/migrate', [CustomersController::class, 'migrateCustomers'])->name('migrate-customers'); Route::delete('/{customerId}', [CustomersController::class, 'deleteM2Customer'])->name('delete-customer'); });