40 lines
1.5 KiB
PHP
40 lines
1.5 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\MainController;
|
|
use App\Http\Controllers\StripePaymentController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
Route::get('/', [MainController::class, 'index']);
|
|
Route::get('/about', [MainController::class, 'about']);
|
|
Route::get('/blog', [MainController::class, 'blog']);
|
|
|
|
Route::get('/profile', [MainController::class, 'profile']);
|
|
|
|
Route::post('/updateUser', [MainController::class, 'updateUser']);
|
|
|
|
Route::get('/cart', [MainController::class, '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']);
|
|
Route::get('/main', [MainController::class, 'main']);
|
|
|
|
Route::get('/shop', [MainController::class, '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']);
|
|
Route::post('/loginUser', [MainController::class, 'loginUser']);
|
|
|
|
Route::get('/logout', [MainController::class, 'logout']);
|
|
|
|
|
|
Route::controller(StripePaymentController::class)->group(function () {
|
|
Route::get('stripe', 'stripe');
|
|
Route::post('stripe', 'stripePost')->name('stripe.post');
|
|
});
|