wholesale.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | B2B Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register admin routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | contains the "web" middleware group. Now create something great!
  10. |
  11. */
  12. use App\Http\Controllers\WholesaleProductController;
  13. //Admin
  14. Route::group(['prefix' =>'admin', 'middleware' => ['auth', 'admin']], function(){
  15. Route::controller(WholesaleProductController::class)->group(function () {
  16. Route::get('/wholesale/all-products', 'all_wholesale_products')->name('wholesale_products.all');
  17. Route::get('/wholesale/inhouse-products', 'in_house_wholesale_products')->name('wholesale_products.in_house');
  18. Route::get('/wholesale/seller-products', 'seller_wholesale_products')->name('wholesale_products.seller');
  19. Route::get('/wholesale-product/create', 'product_create_admin')->name('wholesale_product_create.admin');
  20. Route::post('/wholesale-product/store', 'product_store_admin')->name('wholesale_product_store.admin');
  21. Route::get('/wholesale-product/{id}/edit', 'product_edit_admin')->name('wholesale_product_edit.admin');
  22. Route::post('/wholesale-product/update/{id}', 'product_update_admin')->name('wholesale_product_update.admin');
  23. Route::get('/wholesale-product/destroy/{id}', 'product_destroy_admin')->name('wholesale_product_destroy.admin');
  24. });
  25. });
  26. Route::group(['prefix' => 'seller', 'middleware' => ['seller', 'verified', 'user']], function() {
  27. Route::controller(WholesaleProductController::class)->group(function () {
  28. Route::get('/wholesale-products', 'wholesale_products_list_seller')->name('seller.wholesale_products_list');
  29. Route::get('/wholesale-product/create', 'product_create_seller')->name('wholesale_product_create.seller');
  30. Route::post('/wholesale-product/store', 'product_store_seller')->name('wholesale_product_store.seller');
  31. Route::get('/wholesale-products/{id}/edit', 'product_edit_seller')->name('wholesale_product_edit.seller');
  32. Route::post('/wholesale-product/update/{id}', 'product_update_seller')->name('wholesale_product_update.seller');
  33. Route::get('/wholesale-product/destroy/{id}', 'product_destroy_seller')->name('wholesale_product_destroy.seller');
  34. });
  35. });