seller.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <?php
  2. use App\Http\Controllers\AizUploadController;
  3. //Upload
  4. Route::group(['prefix' => 'seller', 'middleware' => ['seller', 'verified', 'user'], 'as' => 'seller.'], function () {
  5. Route::controller(AizUploadController::class)->group(function () {
  6. Route::any('/uploads', 'index')->name('uploaded-files.index');
  7. Route::any('/uploads/create', 'create')->name('uploads.create');
  8. Route::any('/uploads/file-info', 'file_info')->name('my_uploads.info');
  9. Route::get('/uploads/destroy/{id}', 'destroy')->name('my_uploads.destroy');
  10. });
  11. });
  12. Route::group(['namespace' => 'App\Http\Controllers\Seller', 'prefix' => 'seller', 'middleware' => ['seller', 'verified', 'user'], 'as' => 'seller.'], function () {
  13. Route::controller(DashboardController::class)->group(function () {
  14. Route::get('/dashboard', 'index')->name('dashboard');
  15. });
  16. Route::controller(TransactionController::class)->group(function () {
  17. Route::get('/transaction', 'index')->name('transaction');
  18. Route::get('/transaction/find', 'find')->name('transaction.find');
  19. Route::post('/transaction/update', 'update')->name('transaction.update');
  20. });
  21. Route::controller(SellerController::class)->group(function () {
  22. Route::get('/seller/{id}/edit', 'edit')->name('seller.edit');
  23. Route::post('/seller/update/{product}', 'update')->name('seller.update');
  24. Route::get('/seller/del/{id}', 'del')->name('seller.del');
  25. Route::post('/seller/updatePublished', 'updatePublished')->name('seller.updatePublished');
  26. });
  27. // Product
  28. Route::controller(ProductController::class)->group(function () {
  29. Route::get('/products', 'index')->name('products');
  30. Route::get('/product/create', 'create')->name('products.create');
  31. Route::post('/products/store/', 'store')->name('products.store');
  32. Route::get('/product/{id}/edit', 'edit')->name('products.edit');
  33. Route::post('/products/update/{product}', 'update')->name('products.update');
  34. Route::get('/products/duplicate/{id}', 'duplicate')->name('products.duplicate');
  35. Route::post('/products/sku_combination', 'sku_combination')->name('products.sku_combination');
  36. Route::post('/products/sku_combination_edit', 'sku_combination_edit')->name('products.sku_combination_edit');
  37. Route::post('/products/add-more-choice-option', 'add_more_choice_option')->name('products.add-more-choice-option');
  38. Route::post('/products/seller/featured', 'updateFeatured')->name('products.featured');
  39. Route::post('/products/published', 'updatePublished')->name('products.published');
  40. Route::get('/products/destroy/{id}', 'destroy')->name('products.destroy');
  41. Route::post('/products/spread', 'updateSellerSpreadPackage')->name('products.spread');
  42. Route::post('/products/product_seller_review_modal', 'product_seller_review_modal')->name('products.product_seller_review_modal');
  43. });
  44. // Product Storehouse
  45. Route::controller(ProductStorehouseController::class)->group(function () {
  46. Route::get('/product/storehouse', 'index')->name('product_storehouse.index');
  47. Route::get('/product/storehouse/search', 'searchProduct')->name('product_storehouse.search');
  48. Route::post('/product/storehouse/add', 'addProduct')->name('product_storehouse.add');
  49. });
  50. // Product Bulk Upload
  51. Route::controller(ProductBulkUploadController::class)->group(function () {
  52. Route::get('/product-bulk-upload/index', 'index')->name('product_bulk_upload.index');
  53. Route::post('/product-bulk-upload/store', 'bulk_upload')->name('bulk_product_upload');
  54. Route::group(['prefix' => 'bulk-upload/download'], function() {
  55. Route::get('/category', 'App\Http\Controllers\ProductBulkUploadController@pdf_download_category')->name('pdf.download_category');
  56. Route::get('/brand', 'App\Http\Controllers\ProductBulkUploadController@pdf_download_brand')->name('pdf.download_brand');
  57. });
  58. });
  59. // Digital Product
  60. Route::controller(DigitalProductController::class)->group(function () {
  61. Route::get('/digitalproducts', 'index')->name('digitalproducts');
  62. Route::get('/digitalproducts/create', 'create')->name('digitalproducts.create');
  63. Route::post('/digitalproducts/store', 'store')->name('digitalproducts.store');
  64. Route::get('/digitalproducts/{id}/edit', 'edit')->name('digitalproducts.edit');
  65. Route::post('/digitalproducts/update/{id}', 'update')->name('digitalproducts.update');
  66. Route::get('/digitalproducts/destroy/{id}', 'destroy')->name('digitalproducts.destroy');
  67. Route::get('/digitalproducts/download/{id}', 'download')->name('digitalproducts.download');
  68. });
  69. //Coupon
  70. Route::resource('coupon', CouponController::class);
  71. Route::controller(CouponController::class)->group(function () {
  72. Route::post('/coupon/get_form', 'get_coupon_form')->name('coupon.get_coupon_form');
  73. Route::post('/coupon/get_form_edit', 'get_coupon_form_edit')->name('coupon.get_coupon_form_edit');
  74. Route::get('/coupon/destroy/{id}', 'destroy')->name('coupon.destroy');
  75. });
  76. //Order
  77. Route::resource('orders', OrderController::class);
  78. Route::controller(OrderController::class)->group(function () {
  79. Route::post('/orders/payment/storehouse', 'paymentForStorehouseProductAmount')->name('orders.payment_for_storehouse_product');
  80. Route::post('/orders/update_delivery_status', 'update_delivery_status')->name('orders.update_delivery_status');
  81. Route::post('/orders/update_payment_status', 'update_payment_status')->name('orders.update_payment_status');
  82. });
  83. Route::controller(InvoiceController::class)->group(function () {
  84. Route::get('/invoice/{order_id}', 'invoice_download')->name('invoice.download');
  85. });
  86. // Route::get('invoice/{order_id}',[InvoiceController::class, 'invoice_download'])->name('invoice.download');
  87. //Review
  88. Route::controller(ReviewController::class)->group(function () {
  89. Route::get('/reviews', 'index')->name('reviews');
  90. Route::get('/edit', 'edit')->name('edit');
  91. Route::get('/del', 'del')->name('del');
  92. Route::post('/update', 'update')->name('update');
  93. Route::post('/updateStatus', 'updateStatus')->name('updateStatus');
  94. });
  95. // Route::get('/reviews', [ReviewController::class, 'index'])->name('reviews');
  96. //Shop
  97. Route::controller(ShopController::class)->group(function () {
  98. Route::get('/shop', 'index')->name('shop.index');
  99. Route::post('/shop/update', 'update')->name('shop.update');
  100. Route::post('/shop/online_service_update', 'online_service_update')->name('shop.online_service_update');
  101. Route::get('/shop/apply_for_verification', 'verify_form')->name('shop.verify');
  102. Route::post('/shop/verification_info_store', 'verify_form_store')->name('shop.verify.store');
  103. // Route::post('/shop/regstore', 'regstore')->name('shop.regstore');
  104. });
  105. //Payments
  106. Route::resource('payments', PaymentController::class);
  107. // Profile Settings
  108. Route::controller(ProfileController::class)->group(function () {
  109. Route::get('/profile', 'index')->name('profile.index');
  110. Route::post('/profile/update/{id}', 'update')->name('profile.update');
  111. });
  112. Route::controller(ProfileController::class)->group(function () {
  113. Route::get('/profile', 'index')->name('profile.index');
  114. Route::post('/profile/update/{id}', 'update')->name('profile.update');
  115. });
  116. // Address
  117. Route::resource('addresses', AddressController::class);
  118. Route::controller(AddressController::class)->group(function () {
  119. Route::post('/get-states', 'getStates')->name('get-state');
  120. Route::post('/get-cities', 'getCities')->name('get-city');
  121. Route::post('/address/update/{id}', 'update')->name('addresses.update');
  122. Route::get('/addresses/destroy/{id}', 'destroy')->name('addresses.destroy');
  123. Route::get('/addresses/set_default/{id}', 'set_default')->name('addresses.set_default');
  124. });
  125. // Money Withdraw Requests
  126. Route::controller(SellerWithdrawRequestController::class)->group(function () {
  127. Route::get('/money-withdraw-requests', 'index')->name('money_withdraw_requests.index');
  128. Route::post('/money-withdraw-request/store', 'store')->name('money_withdraw_request.store');
  129. });
  130. // Commission History
  131. Route::controller(CommissionHistoryController::class)->group(function () {
  132. Route::get('/commission-history', 'index')->name('commission-history.index');
  133. });
  134. //Conversations
  135. Route::controller(ConversationController::class)->group(function () {
  136. Route::get('/conversations', 'index')->name('conversations.index');
  137. Route::get('/conversations/show/{id}', 'show')->name('conversations.show');
  138. Route::post('conversations/refresh', 'refresh')->name('conversations.refresh');
  139. Route::post('conversations/message/store', 'message_store')->name('conversations.message_store');
  140. Route::get('/conversations/count', 'message_count')->name('conversations.message_count');
  141. });
  142. // product query (comments) show on seller panel
  143. Route::controller(ProductQueryController::class)->group(function () {
  144. Route::get('/product-queries', 'index')->name('product_query.index');
  145. Route::get('/product-queries/{id}', 'show')->name('product_query.show');
  146. Route::put('/product-queries/{id}', 'reply')->name('product_query.reply');
  147. });
  148. // Support Ticket
  149. Route::controller(SupportTicketController::class)->group(function () {
  150. Route::get('/support_ticket', 'index')->name('support_ticket.index');
  151. Route::post('/support_ticket/store', 'store')->name('support_ticket.store');
  152. Route::get('/support_ticket/show/{id}', 'show')->name('support_ticket.show');
  153. Route::post('/support_ticket/reply', 'ticket_reply_store')->name('support_ticket.reply_store');
  154. });
  155. // Notifications
  156. Route::controller(NotificationController::class)->group(function () {
  157. Route::get('/all-notification', 'index')->name('all-notification');
  158. });
  159. });