Skip to content

Commit

Permalink
clean web routes
Browse files Browse the repository at this point in the history
  • Loading branch information
mranidev committed Aug 23, 2024
1 parent 113ccac commit 6d4b0cd
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,31 @@
use App\Http\Controllers\ProductController;
use App\Http\Controllers\HomeController;

// Route::get('/', 'FrontProductListController@index');
Route::get('/', [FrontProductListController::class, 'index']);
Route::get('/home', [HomeController::class, 'index'])->name('home');

Route::get('/product/{id}', [FrontProductListController::class, 'show'])->name('product.view');
Route::get('/orders', [CartController::class, 'order'])->name('order')->middleware('auth');
Route::get('/checkout/{amount}', [CartController::class, 'checkout'])->name('cart.checkout')->middleware('auth');
Route::post('/charge', [CartController::class, 'charge'])->name('cart.charge');
// Route::get('/category/{name}', 'FrontProductListController@allProduct')->name('product.list');
Route::get('/category/{name}', [FrontProductListController::class, 'allProduct'])->name('product.list');
Route::get('/addToCart/{product}', [CartController::class, 'addToCart'])->name('add.cart');
Route::get('/cart', [CartController::class, 'showCart'])->name('cart.show');

Route::post('/products/{product}', [CartController::class, 'updateCart'])->name('cart.update');
Route::post('/product/{product}', [CartController::class, 'removeCart'])->name('cart.remove');

Route::get('all/products', [FrontProductListController::class, 'moreProducts'])->name('more.product');
Route::get('subcatories/{id}', [ProductController::class, 'loadSubCategories']);

// Auth::routes();

Route::get('all/products', [FrontProductListController::class, 'moreProducts'])->name('more.product');
Route::get('/home', [HomeController::class, 'index'])->name('home');
// Route::get('subcatories/{id}', 'ProductController@loadSubCategories');

// Auth::routes();
Route::get('/dashboard', function () {
return redirect('/');
})->middleware(['auth', 'verified'])->name('dashboard');



// Route::middleware('auth')->group(function () {
// Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
// Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Expand Down

0 comments on commit 6d4b0cd

Please sign in to comment.