generated from boboko/starter
Feat: Removing Cart and Checkout from core
This commit is contained in:
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\Checkout\CartController;
|
||||
use App\Http\Controllers\Checkout\CheckoutController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
* Cart + checkout module routes.
|
||||
*
|
||||
* The {locale} prefix and `locale` middleware mirror the 3dealer host's
|
||||
* localization convention (CLAUDE.md » Localization). When this module moves to
|
||||
* boboko-core the route definitions travel with it, but each host wraps them in
|
||||
* whatever prefix/middleware it uses. Every action still declares $locale as its
|
||||
* first parameter regardless, per the ControllerDispatcher positional-args
|
||||
* gotcha documented in CLAUDE.md.
|
||||
*
|
||||
* Loaded from CheckoutModuleServiceProvider inside the `web` middleware group.
|
||||
*/
|
||||
Route::prefix('{locale}')
|
||||
->middleware('locale')
|
||||
->group(function () {
|
||||
// No standalone cart page — the drawer (checkout::drawer) is the cart.
|
||||
Route::get('checkout', [CheckoutController::class, 'show'])
|
||||
->name('checkout.show');
|
||||
|
||||
Route::post('checkout/address', [CheckoutController::class, 'saveAddress'])
|
||||
->name('checkout.address.save');
|
||||
|
||||
Route::post('checkout/shipping-option', [CheckoutController::class, 'selectShippingOption'])
|
||||
->name('checkout.shipping-option.select');
|
||||
|
||||
Route::post('checkout/payment-method', [CheckoutController::class, 'selectPaymentMethod'])
|
||||
->name('checkout.payment-method.select');
|
||||
|
||||
Route::post('checkout/place-order', [CheckoutController::class, 'placeOrder'])
|
||||
->name('checkout.place-order');
|
||||
|
||||
Route::get('checkout/order-status', [CheckoutController::class, 'orderStatus'])
|
||||
->name('checkout.order-status');
|
||||
|
||||
Route::get('checkout/confirmation', [CheckoutController::class, 'confirmation'])
|
||||
->name('checkout.confirmation');
|
||||
|
||||
Route::post('cart/lines', [CartController::class, 'add'])
|
||||
->name('checkout.cart.add');
|
||||
|
||||
Route::patch('cart/lines/{line}', [CartController::class, 'updateLine'])
|
||||
->whereNumber('line')
|
||||
->name('checkout.cart.update');
|
||||
|
||||
Route::delete('cart/lines/{line}', [CartController::class, 'remove'])
|
||||
->whereNumber('line')
|
||||
->name('checkout.cart.remove');
|
||||
|
||||
Route::post('cart/coupon', [CartController::class, 'applyCoupon'])
|
||||
->name('checkout.cart.coupon.apply');
|
||||
|
||||
Route::delete('cart/coupon', [CartController::class, 'removeCoupon'])
|
||||
->name('checkout.cart.coupon.remove');
|
||||
});
|
||||
Reference in New Issue
Block a user