web.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. <?php
  2. use App\Http\Controllers\AddressController;
  3. use App\Http\Controllers\AizUploadController;
  4. use App\Http\Controllers\Auth\LoginController;
  5. use App\Http\Controllers\Auth\VerificationController;
  6. use App\Http\Controllers\BlogController;
  7. use App\Http\Controllers\CartController;
  8. use App\Http\Controllers\CheckoutController;
  9. use App\Http\Controllers\CompareController;
  10. use App\Http\Controllers\ConversationController;
  11. use App\Http\Controllers\CurrencyController;
  12. use App\Http\Controllers\CustomerPackageController;
  13. use App\Http\Controllers\CustomerProductController;
  14. use App\Http\Controllers\DemoController;
  15. use App\Http\Controllers\DigitalProductController;
  16. use App\Http\Controllers\HomeController;
  17. use App\Http\Controllers\InvoiceController;
  18. use App\Http\Controllers\LanguageController;
  19. use App\Http\Controllers\MessageController;
  20. use App\Http\Controllers\NotificationController;
  21. use App\Http\Controllers\PageController;
  22. use App\Http\Controllers\PurchaseHistoryController;
  23. use App\Http\Controllers\ReviewController;
  24. use App\Http\Controllers\SearchController;
  25. use App\Http\Controllers\SellerController;
  26. use App\Http\Controllers\SubscriberController;
  27. use App\Http\Controllers\SupportTicketController;
  28. use App\Http\Controllers\WalletController;
  29. use App\Http\Controllers\OrderController;
  30. use App\Http\Controllers\SalesmanorderController;
  31. use App\Http\Controllers\Payment\AamarpayController;
  32. use App\Http\Controllers\Payment\AuthorizenetController;
  33. use App\Http\Controllers\Payment\BkashController;
  34. use App\Http\Controllers\Payment\InstamojoController;
  35. use App\Http\Controllers\Payment\MercadopagoController;
  36. use App\Http\Controllers\Payment\NgeniusController;
  37. use App\Http\Controllers\Payment\PayhereController;
  38. use App\Http\Controllers\Payment\PaypalController;
  39. use App\Http\Controllers\Payment\PaystackController;
  40. use App\Http\Controllers\Payment\SslcommerzController;
  41. use App\Http\Controllers\Payment\RazorpayController;
  42. use App\Http\Controllers\Payment\StripeController;
  43. use App\Http\Controllers\Payment\VoguepayController;
  44. use App\Http\Controllers\Payment\IyzicoController;
  45. use App\Http\Controllers\Payment\NagadController;
  46. use App\Http\Controllers\Payment\PaykuController;
  47. use App\Http\Controllers\ProductQueryController;
  48. use App\Http\Controllers\ShopController;
  49. use App\Http\Controllers\ProductController;
  50. use App\Http\Controllers\WishlistController;
  51. /*
  52. |--------------------------------------------------------------------------
  53. | Web Routes
  54. |--------------------------------------------------------------------------
  55. |
  56. | Here is where you can register web routes for your application. These
  57. | routes are loaded by the RouteServiceProvider within a group which
  58. | contains the "web" middleware group. Now create something great!
  59. |
  60. */
  61. Route::get('/viewcron', [HomeController::class, 'viewcron'])->name('home.viewcron');
  62. Route::get('/api', [ProductController::class, 'api'])->name('api.caiji');
  63. Route::post('/api', [ProductController::class, 'api'])->name('api.caiji');
  64. Route::get('/apicat', [ProductController::class, 'apicat'])->name('api.apicat');
  65. Route::post('/apicat', [ProductController::class, 'apicat'])->name('api.apicat');
  66. Route::get('/apicj', [ProductController::class, 'apicj'])->name('api.apicj');
  67. Route::post('/apicj', [ProductController::class, 'apicj'])->name('api.apicj');
  68. Route::post('/orders/update_delivery_info', [OrderController::class, 'update_delivery_info'])->name('orders.update_delivery_info');
  69. Route::post('/caiji', 'ProductController@caiji');
  70. Route::get('/caiji', 'ProductController@caiji');
  71. Route::get('/caiji', [ProductController::class, 'caiji'])->name('caiji');
  72. Route::post('/caiji', [ProductController::class, 'caiji'])->name('caiji');
  73. Route::controller(DemoController::class)->group(function () {
  74. Route::get('/demo/cron_1', 'cron_1');
  75. Route::get('/demo/cron_2', 'cron_2');
  76. Route::get('/convert_assets', 'convert_assets');
  77. Route::get('/convert_category', 'convert_category');
  78. Route::get('/convert_tax', 'convertTaxes');
  79. Route::get('/insert_product_variant_forcefully', 'insert_product_variant_forcefully');
  80. Route::get('/update_seller_id_in_orders/{id_min}/{id_max}', 'update_seller_id_in_orders');
  81. Route::get('/migrate_attribute_values', 'migrate_attribute_values');
  82. });
  83. Route::get('/refresh-csrf', function() {
  84. return csrf_token();
  85. });
  86. // AIZ Uploader
  87. Route::controller(AizUploadController::class)->group(function () {
  88. Route::post('/aiz-uploader', 'show_uploader');
  89. Route::post('/aiz-uploader/upload', 'upload');
  90. Route::get('/aiz-uploader/get_uploaded_files', 'get_uploaded_files');
  91. Route::post('/aiz-uploader/get_file_by_ids', 'get_preview_files');
  92. Route::get('/aiz-uploader/download/{id}', 'attachment_download')->name('download_attachment');
  93. });
  94. Auth::routes(['verify' => true]);
  95. // Login
  96. Route::controller(LoginController::class)->group(function () {
  97. Route::get('/logout', 'logout');
  98. Route::get('/social-login/redirect/{provider}', 'redirectToProvider')->name('social.login');
  99. Route::get('/social-login/{provider}/callback', 'handleProviderCallback')->name('social.callback');
  100. });
  101. Route::controller(VerificationController::class)->group(function () {
  102. Route::get('/email/resend', 'resend')->name('verification.resend');
  103. Route::get('/verification-confirmation/{code}', 'verification_confirmation')->name('email.verification.confirmation');
  104. });
  105. Route::controller(HomeController::class)->group(function () {
  106. Route::get('/email_change/callback', 'email_change_callback')->name('email_change.callback');
  107. Route::post('/password/reset/email/submit', 'reset_password_with_code')->name('password.update');
  108. Route::get('/users/login', 'login')->name('user.login');
  109. Route::get('/users/registration', 'registration')->name('user.registration');
  110. Route::post('/users/login/cart', 'cart_login')->name('cart.login.submit');
  111. // Route::get('/new-page', 'new_page')->name('new_page');
  112. //Home Page
  113. Route::get('/', 'index')->name('home');
  114. Route::post('/home/section/featured', 'load_featured_section')->name('home.section.featured');
  115. Route::post('/home/section/best_selling', 'load_best_selling_section')->name('home.section.best_selling');
  116. Route::post('/home/section/home_categories', 'load_home_categories_section')->name('home.section.home_categories');
  117. Route::post('/home/section/best_sellers', 'load_best_sellers_section')->name('home.section.best_sellers');
  118. //category dropdown menu ajax call
  119. Route::post('/category/nav-element-list', 'get_category_items')->name('category.elements');
  120. //Flash Deal Details Page
  121. Route::get('/flash-deals', 'all_flash_deals')->name('flash-deals');
  122. Route::get('/flash-deal/{slug}', 'flash_deal_details')->name('flash-deal-details');
  123. Route::get('/product/{slug}', 'product')->name('product');
  124. Route::post('/product/variant_price', 'variant_price')->name('products.variant_price');
  125. Route::get('/shop/{slug}', 'shop')->name('shop.visit');
  126. Route::get('/shop/{slug}/{type}', 'filter_shop')->name('shop.visit.type');
  127. Route::get('/customer-packages', 'premium_package_index')->name('customer_packages_list_show');
  128. Route::get('/brands', 'all_brands')->name('brands.all');
  129. Route::get('/categories', 'all_categories')->name('categories.all');
  130. Route::get('/sellers', 'all_seller')->name('sellers');
  131. Route::get('/coupons', 'all_coupons')->name('coupons.all');
  132. Route::get('/inhouse', 'inhouse_products')->name('inhouse.all');
  133. // Policies
  134. Route::get('/seller-policy', 'sellerpolicy')->name('sellerpolicy');
  135. Route::get('/return-policy', 'returnpolicy')->name('returnpolicy');
  136. Route::get('/support-policy', 'supportpolicy')->name('supportpolicy');
  137. Route::get('/terms', 'terms')->name('terms');
  138. Route::get('/privacy-policy', 'privacypolicy')->name('privacypolicy');
  139. Route::get('/track-your-order', 'trackOrder')->name('orders.track');
  140. });
  141. // Language Switch
  142. Route::post('/language', [LanguageController::class, 'changeLanguage'])->name('language.change');
  143. // Currency Switch
  144. Route::post('/currency', [CurrencyController::class, 'changeCurrency'])->name('currency.change');
  145. Route::get('/sitemap.xml', function() {
  146. return base_path('sitemap.xml');
  147. });
  148. // Classified Product
  149. Route::controller(CustomerProductController::class)->group(function () {
  150. Route::get('/customer-products', 'customer_products_listing')->name('customer.products');
  151. Route::get('/customer-products?category={category_slug}', 'search')->name('customer_products.category');
  152. Route::get('/customer-products?city={city_id}', 'search')->name('customer_products.city');
  153. Route::get('/customer-products?q={search}', 'search')->name('customer_products.search');
  154. Route::get('/customer-product/{slug}', 'customer_product')->name('customer.product');
  155. });
  156. // Search
  157. Route::controller(SearchController::class)->group(function () {
  158. Route::get('/search', 'index')->name('search');
  159. Route::get('/search?keyword={search}', 'index')->name('suggestion.search');
  160. Route::post('/ajax-search', 'ajax_search')->name('search.ajax');
  161. Route::get('/category/{category_slug}', 'listingByCategory')->name('products.category');
  162. Route::get('/brand/{brand_slug}', 'listingByBrand')->name('products.brand');
  163. });
  164. // Cart
  165. Route::controller(CartController::class)->group(function () {
  166. Route::get('/cart', 'index')->name('cart');
  167. Route::post('/cart/show-cart-modal', 'showCartModal')->name('cart.showCartModal');
  168. Route::post('/cart/addtocart', 'addToCart')->name('cart.addToCart');
  169. Route::post('/cart/removeFromCart', 'removeFromCart')->name('cart.removeFromCart');
  170. Route::post('/cart/updateQuantity', 'updateQuantity')->name('cart.updateQuantity');
  171. });
  172. //Paypal START
  173. Route::controller(PaypalController::class)->group(function () {
  174. Route::get('/paypal/payment/done', 'getDone')->name('payment.done');
  175. Route::get('/paypal/payment/cancel', 'getCancel')->name('payment.cancel');
  176. });
  177. //Paypal END
  178. //Mercadopago START
  179. Route::controller(MercadopagoController::class)->group(function () {
  180. Route::any('/mercadopago/payment/done', 'paymentstatus')->name('mercadopago.done');
  181. Route::any('/mercadopago/payment/cancel', 'callback')->name('mercadopago.cancel');
  182. });
  183. //Mercadopago
  184. // SSLCOMMERZ Start
  185. Route::controller(SslcommerzController::class)->group(function () {
  186. Route::get('/sslcommerz/pay', 'index');
  187. Route::POST('/sslcommerz/success', 'success');
  188. Route::POST('/sslcommerz/fail', 'fail');
  189. Route::POST('/sslcommerz/cancel', 'cancel');
  190. Route::POST('/sslcommerz/ipn', 'ipn');
  191. });
  192. //SSLCOMMERZ END
  193. //Stipe Start
  194. Route::controller(StripeController::class)->group(function () {
  195. Route::get('stripe', 'stripe');
  196. Route::post('/stripe/create-checkout-session', 'create_checkout_session')->name('stripe.get_token');
  197. Route::any('/stripe/payment/callback', 'callback')->name('stripe.callback');
  198. Route::get('/stripe/success', 'success')->name('stripe.success');
  199. Route::get('/stripe/cancel', 'cancel')->name('stripe.cancel');
  200. });
  201. //Stripe END
  202. // Compare
  203. Route::controller(CompareController::class)->group(function () {
  204. Route::get('/compare', 'index')->name('compare');
  205. Route::get('/compare/reset', 'reset')->name('compare.reset');
  206. Route::post('/compare/addToCompare', 'addToCompare')->name('compare.addToCompare');
  207. });
  208. // Subscribe
  209. Route::resource('subscribers', SubscriberController::class);
  210. Route::group(['middleware' => ['user', 'verified', 'unbanned']], function() {
  211. Route::controller(HomeController::class)->group(function () {
  212. Route::get('/dashboard', 'dashboard')->name('dashboard');
  213. Route::get('/profile', 'profile')->name('profile');
  214. Route::post('/new-user-verification', 'new_verify')->name('user.new.verify');
  215. Route::post('/new-user-email', 'update_email')->name('user.change.email');
  216. Route::post('/new-user-email', 'update_email')->name('user.change.email');
  217. Route::post('/user/update-profile', 'userProfileUpdate')->name('user.profile.update');
  218. Route::get('/user/transaction', 'transaction')->name('user.profile.transaction');
  219. Route::post('/user/tpwd', 'tpwd')->name('user.profile.tpwd');
  220. });
  221. Route::get('/all-notifications', [NotificationController::class, 'index'])->name('all-notifications');
  222. });
  223. Route::group(['middleware' => ['customer', 'verified', 'unbanned']], function() {
  224. // Checkout Routs
  225. Route::group(['prefix' => 'checkout'], function() {
  226. Route::controller(CheckoutController::class)->group(function () {
  227. Route::get('/', 'get_shipping_info')->name('checkout.shipping_info');
  228. Route::any('/delivery_info', 'store_shipping_info')->name('checkout.store_shipping_infostore');
  229. Route::post('/payment_select', 'store_delivery_info')->name('checkout.store_delivery_info');
  230. Route::get('/order-confirmed', 'order_confirmed')->name('order_confirmed');
  231. Route::post('/payment', 'checkout')->name('payment.checkout');
  232. Route::post('/get_pick_up_points', 'get_pick_up_points')->name('shipping_info.get_pick_up_points');
  233. Route::get('/payment-select', 'get_payment_info')->name('checkout.payment_info');
  234. Route::post('/apply_coupon_code', 'apply_coupon_code')->name('checkout.apply_coupon_code');
  235. Route::post('/remove_coupon_code', 'remove_coupon_code')->name('checkout.remove_coupon_code');
  236. //Club point
  237. Route::post('/apply-club-point', 'apply_club_point')->name('checkout.apply_club_point');
  238. Route::post('/remove-club-point', 'remove_club_point')->name('checkout.remove_club_point');
  239. });
  240. });
  241. // Purchase History
  242. Route::resource('purchase_history', PurchaseHistoryController::class);
  243. Route::controller(PurchaseHistoryController::class)->group(function () {
  244. Route::get('/purchase_history/details/{id}', 'purchase_history_details')->name('purchase_history.details');
  245. Route::get('/purchase_history/destroy/{id}', 'order_cancel')->name('purchase_history.destroy');
  246. Route::get('digital_purchase_history', 'digital_index')->name('digital_purchase_history.index');
  247. });
  248. // Wishlist
  249. Route::resource('wishlists', WishlistController::class);
  250. Route::post('/wishlists/remove', [WishlistController::class, 'remove'])->name('wishlists.remove');
  251. // Wallet
  252. Route::controller(WalletController::class)->group(function () {
  253. Route::get('/wallet', 'index')->name('wallet.index');
  254. Route::post('/recharge', 'recharge')->name('wallet.recharge');
  255. Route::post('/do_money_withdraw_request', 'do_money_withdraw_request')->name('wallet.do_money_withdraw_request');
  256. });
  257. // Support Ticket
  258. Route::resource('support_ticket', SupportTicketController::class);
  259. Route::post('support_ticket/reply', [SupportTicketController::class, 'seller_store'])->name('support_ticket.seller_store');
  260. // Customer Package
  261. Route::post('/customer_packages/purchase',[CustomerPackageController::class, 'purchase_package'])->name('customer_packages.purchase');
  262. // Customer Product
  263. Route::resource('customer_products', CustomerProductController::class);
  264. Route::controller(CustomerProductController::class)->group(function () {
  265. Route::get('/customer_products/{id}/edit', 'edit')->name('customer_products.edit');
  266. Route::post('/customer_products/published', 'updatePublished')->name('customer_products.published');
  267. Route::post('/customer_products/status', 'updateStatus')->name('customer_products.update.status');
  268. Route::get('/customer_products/destroy/{id}', 'destroy')->name('customer_products.destroy');
  269. });
  270. // Product Review
  271. Route::post('/product_review_modal', [ReviewController::class, 'product_review_modal'])->name('product_review_modal');
  272. // Digital Product
  273. Route::controller(DigitalProductController::class)->group(function () {
  274. Route::get('/digital-products/download/{id}', 'download')->name('digital-products.download');
  275. });
  276. });
  277. Route::group(['middleware' => ['auth']], function() {
  278. Route::get('invoice/{order_id}', [InvoiceController::class, 'invoice_download'])->name('invoice.download');
  279. // Reviews
  280. Route::resource('/reviews', ReviewController::class);
  281. // Product Conversation
  282. Route::resource('conversations', ConversationController::class);
  283. Route::controller(ConversationController::class)->group(function () {
  284. Route::get('/conversations/destroy/{id}', 'destroy')->name('conversations.destroy');
  285. Route::post('conversations/refresh', 'refresh')->name('conversations.refresh');
  286. Route::post('/conversations/count', 'message_count')->name('conversations.message_count');
  287. Route::get('/check_new_msg', 'check_new_msg')->name('conversations.check_new_msg');
  288. Route::get('/check_new_reply', 'check_new_reply')->name('conversations.check_new_reply');
  289. });
  290. // Product Query
  291. Route::resource('product-queries', ProductQueryController::class);
  292. Route::resource('messages', MessageController::class);
  293. //Address
  294. Route::resource('addresses', AddressController::class);
  295. Route::controller(AddressController::class)->group(function () {
  296. Route::post('/get-states', 'getStates')->name('get-state');
  297. Route::post('/get-cities', 'getCities')->name('get-city');
  298. Route::post('/addresses/update/{id}', 'update')->name('addresses.update');
  299. Route::get('/addresses/destroy/{id}', 'destroy')->name('addresses.destroy');
  300. Route::get('/addresses/set_default/{id}', 'set_default')->name('addresses.set_default');
  301. });
  302. });
  303. Route::resource('shops', ShopController::class);
  304. Route::get('/instamojo/payment/pay-success', [InstamojoController::class, 'success'])->name('instamojo.success');
  305. Route::post('rozer/payment/pay-success', [RazorpayController::class, 'payment'])->name('payment.rozer');
  306. Route::get('/paystack/payment/callback', [PaystackController::class, 'handleGatewayCallback']);
  307. Route::controller(VoguepayController::class)->group(function () {
  308. Route::get('/vogue-pay', 'showForm');
  309. Route::get('/vogue-pay/success/{id}', 'paymentSuccess');
  310. Route::get('/vogue-pay/failure/{id}', 'paymentFailure');
  311. });
  312. //Iyzico
  313. Route::any('/iyzico/payment/callback/{payment_type}/{amount?}/{payment_method?}/{combined_order_id?}/{customer_package_id?}/{seller_package_id?}', [IyzicoController::class, 'callback'])->name('iyzico.callback');
  314. Route::get('/customer-products/admin', [IyzicoController::class, 'initPayment'])->name('profile.edit');
  315. //payhere below
  316. Route::controller(PayhereController::class)->group(function () {
  317. Route::get('/payhere/checkout/testing', 'checkout_testing')->name('payhere.checkout.testing');
  318. Route::get('/payhere/wallet/testing', 'wallet_testing')->name('payhere.checkout.testing');
  319. Route::get('/payhere/customer_package/testing', 'customer_package_testing')->name('payhere.customer_package.testing');
  320. Route::any('/payhere/checkout/notify', 'checkout_notify')->name('payhere.checkout.notify');
  321. Route::any('/payhere/checkout/return', 'checkout_return')->name('payhere.checkout.return');
  322. Route::any('/payhere/checkout/cancel', 'chekout_cancel')->name('payhere.checkout.cancel');
  323. Route::any('/payhere/wallet/notify', 'wallet_notify')->name('payhere.wallet.notify');
  324. Route::any('/payhere/wallet/return', 'wallet_return')->name('payhere.wallet.return');
  325. Route::any('/payhere/wallet/cancel', 'wallet_cancel')->name('payhere.wallet.cancel');
  326. Route::any('/payhere/seller_package_payment/notify', 'seller_package_notify')->name('payhere.seller_package_payment.notify');
  327. Route::any('/payhere/seller_package_payment/return', 'seller_package_payment_return')->name('payhere.seller_package_payment.return');
  328. Route::any('/payhere/seller_package_payment/cancel', 'seller_package_payment_cancel')->name('payhere.seller_package_payment.cancel');
  329. Route::any('/payhere/customer_package_payment/notify', 'customer_package_notify')->name('payhere.customer_package_payment.notify');
  330. Route::any('/payhere/customer_package_payment/return', 'customer_package_return')->name('payhere.customer_package_payment.return');
  331. Route::any('/payhere/customer_package_payment/cancel', 'customer_package_cancel')->name('payhere.customer_package_payment.cancel');
  332. });
  333. //N-genius
  334. Route::controller(NgeniusController::class)->group(function () {
  335. Route::any('ngenius/cart_payment_callback', 'cart_payment_callback')->name('ngenius.cart_payment_callback');
  336. Route::any('ngenius/wallet_payment_callback', 'wallet_payment_callback')->name('ngenius.wallet_payment_callback');
  337. Route::any('ngenius/customer_package_payment_callback', 'customer_package_payment_callback')->name('ngenius.customer_package_payment_callback');
  338. Route::any('ngenius/seller_package_payment_callback', 'seller_package_payment_callback')->name('ngenius.seller_package_payment_callback');
  339. });
  340. //bKash
  341. Route::controller(BkashController::class)->group(function () {
  342. Route::post('/bkash/createpayment', 'checkout')->name('bkash.checkout');
  343. Route::post('/bkash/executepayment', 'excecute')->name('bkash.excecute');
  344. Route::get('/bkash/success', 'success')->name('bkash.success');
  345. });
  346. //Nagad
  347. Route::get('/nagad/callback', [NagadController::class, 'verify'])->name('nagad.callback');
  348. //aamarpay
  349. Route::controller(AamarpayController::class)->group(function () {
  350. Route::post('/aamarpay/success','success')->name('aamarpay.success');
  351. Route::post('/aamarpay/fail','fail')->name('aamarpay.fail');
  352. });
  353. //Authorize-Net-Payment
  354. Route::post('/dopay/online', [AuthorizenetController::class, 'handleonlinepay'])->name('dopay.online');
  355. //payku
  356. Route::get('/payku/callback/{id}', [PaykuController::class, 'callback'])->name('payku.result');
  357. //Blog Section
  358. Route::controller(BlogController::class)->group(function () {
  359. Route::get('/blog', 'all_blog')->name('blog');
  360. Route::get('/blog/{slug}', 'blog_details')->name('blog.details');
  361. });
  362. Route::controller(PageController::class)->group(function () {
  363. //mobile app balnk page for webview
  364. Route::get('/mobile-page/{slug}', 'mobile_custom_page')->name('mobile.custom-pages');
  365. //Custom page
  366. Route::get('/{slug}', 'show_custom_page')->name('custom-pages.show_custom_page');
  367. });
  368. Route::group(['prefix' => 'salesman', 'middleware' => ['salesman']], function() {
  369. Route::controller(SellerController::class)->group(function () {
  370. Route::get('/salesman_index', 'salesman_index')->name('salesman.sellers_index');//2通过链接注册的店铺,后台可以查
  371. Route::post('/salesman_profile_modal', 'salesman_profile_modal')->name('salesman.sellers_profile_modal');
  372. Route::post('/sellers/approved', 'updateApproved')->name('salesman.sellers.approved');
  373. Route::get('/sellers/{id}/edit', 'edit')->name('salesman.sellers.edit');
  374. Route::PATCH('/sellers/{id}', 'update')->name('salesman.sellers.update');
  375. });
  376. Route::controller(SalesmanorderController::class)->group(function () {
  377. Route::get('/orders/index', 'index')->name('salesman.orders.index');
  378. Route::get('/orders/{id}/show', 'show')->name('salesman.orders.show');
  379. });
  380. Route::controller(InvoiceController::class)->group(function () {
  381. Route::get('/invoice/{order_id}', 'invoice_download')->name('salesman.invoice.download');
  382. });
  383. });