feat: refactor cart and bundle handling to support Buyable interface for improved flexibility

This commit is contained in:
2026-07-14 16:41:34 -03:00
parent ceb1e2b04a
commit 480ee70393
12 changed files with 230 additions and 203 deletions

View File

@@ -8,6 +8,6 @@ Route::prefix('tenants/{tenant:codigo}')
->group(function (): void {
Route::get('cart', [CartController::class, 'show']);
Route::post('cart/items', [CartController::class, 'addItem']);
Route::patch('cart/items/{productVariant}', [CartController::class, 'updateItemQuantity']);
Route::delete('cart/items/{productVariant}', [CartController::class, 'removeItem']);
Route::patch('cart/items/{buyableType}/{buyableId}', [CartController::class, 'updateItemQuantity']);
Route::delete('cart/items/{buyableType}/{buyableId}', [CartController::class, 'removeItem']);
});