laravelEcomm/routes/web.php
2024-07-09 11:44:05 +05:45

41 lines
1.6 KiB
PHP

<?php
use App\Http\Controllers\MainController;
use App\Http\Controllers\StripePaymentController;
use Illuminate\Support\Facades\Route;
Route::get('/', [MainController::class, 'index'])->name('/');
Route::get('/about', [MainController::class, 'about'])->name('about');
Route::get('/blog', [MainController::class, 'blog']);
Route::get('/profile', [MainController::class, 'profile'])->name('profile');
Route::post('/updateUser', [MainController::class, 'updateUser']);
Route::get('/cart', [MainController::class, 'cart'])->name('cart');
Route::post('/addToCart', [MainController::class, 'addToCart']);
Route::get('/deleteCartItem/{id}', [MainController::class, 'deleteCartItem']);
Route::post('/updateCartItem/{id}', [MainController::class, 'updateCartItem'])->name("cart.update");
Route::get('/checkout', [MainController::class, 'checkout'])->name('checkout');
Route::get('/myOrders', [MainController::class, 'myOrders'])->name('myOrders');
Route::get('/shop', [MainController::class, 'shop'])->name('shop');
Route::get('/single/{id}', [MainController::class, 'singleProduct']);
Route::get('/register', [MainController::class, 'register'])->name('register');
Route::post('/registerUser', [MainController::class, 'registerUser'])->name('registerUser');
Route::get('/login', [MainController::class, 'login'])->name('login');
Route::post('/loginUser', [MainController::class, 'loginUser']);
Route::get('/logout', [MainController::class, 'logout'])->name('logout');
Route::controller(StripePaymentController::class)->group(function () {
Route::get('stripe', 'stripe');
Route::post('stripe', 'stripePost')->name('stripe.post');
});