57 lines
2.1 KiB
PHP
57 lines
2.1 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\AdminController;
|
|
use App\Http\Controllers\MainController;
|
|
use App\Http\Controllers\BotManController;
|
|
use App\Http\Controllers\StripePaymentController;
|
|
use BotMan\BotMan\Facades\BotMan;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
//admin routes
|
|
Route::get('/admin', [AdminController::class, 'index'])->name('admin');
|
|
|
|
|
|
|
|
//customer routes
|
|
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');
|
|
});
|
|
|
|
// Route::get('/testMail', [MainController::class, 'testMail'])->name('testMail');
|
|
Route::get('/testMail', [MainController::class, 'testMail'])->name('testMail');
|
|
|
|
|
|
Route::match(['get', 'post'], '/botman', [BotManController::class, 'handle'])->name('botman');
|