2024-07-04 04:34:45 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use App\Http\Controllers\MainController;
|
2024-07-08 09:42:39 +00:00
|
|
|
use App\Http\Controllers\StripePaymentController;
|
2024-07-04 04:34:45 +00:00
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
|
|
|
|
Route::get('/', [MainController::class, 'index']);
|
|
|
|
Route::get('/about', [MainController::class, 'about']);
|
|
|
|
Route::get('/blog', [MainController::class, 'blog']);
|
2024-07-08 09:42:39 +00:00
|
|
|
|
|
|
|
Route::get('/profile', [MainController::class, 'profile']);
|
|
|
|
|
|
|
|
Route::post('/updateUser', [MainController::class, 'updateUser']);
|
2024-07-04 12:07:47 +00:00
|
|
|
|
2024-07-05 06:55:14 +00:00
|
|
|
Route::get('/cart', [MainController::class, 'cart']);
|
2024-07-04 12:07:47 +00:00
|
|
|
Route::post('/addToCart', [MainController::class, 'addToCart']);
|
2024-07-05 07:29:27 +00:00
|
|
|
Route::get('/deleteCartItem/{id}', [MainController::class, 'deleteCartItem']);
|
2024-07-07 07:21:31 +00:00
|
|
|
Route::post('/updateCartItem/{id}', [MainController::class, 'updateCartItem'])->name("cart.update");
|
2024-07-05 09:58:08 +00:00
|
|
|
|
2024-07-04 04:34:45 +00:00
|
|
|
Route::get('/checkout', [MainController::class, 'checkout']);
|
|
|
|
Route::get('/main', [MainController::class, 'main']);
|
2024-07-04 07:19:28 +00:00
|
|
|
|
2024-07-04 04:34:45 +00:00
|
|
|
Route::get('/shop', [MainController::class, 'shop']);
|
|
|
|
Route::get('/single/{id}', [MainController::class, 'singleProduct']);
|
|
|
|
|
2024-07-08 09:42:39 +00:00
|
|
|
Route::get('/register', [MainController::class, 'register'])->name('register');
|
|
|
|
Route::post('/registerUser', [MainController::class, 'registerUser'])->name('registerUser');
|
2024-07-04 04:34:45 +00:00
|
|
|
|
|
|
|
Route::get('/login', [MainController::class, 'login']);
|
|
|
|
Route::post('/loginUser', [MainController::class, 'loginUser']);
|
|
|
|
|
|
|
|
Route::get('/logout', [MainController::class, 'logout']);
|
2024-07-08 09:42:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
Route::controller(StripePaymentController::class)->group(function () {
|
|
|
|
Route::get('stripe', 'stripe');
|
|
|
|
Route::post('stripe', 'stripePost')->name('stripe.post');
|
|
|
|
});
|