group(function (){ Route::middleware('validation')->group(function (){ Route::get('/p', [PriceController::class, 'methodPrices']); //upload file Route::post('/file',[FileController::class, 'store']); //settigs Route::get('get_settings',[SettingsController::class, 'index']); Route::post('get_settings',[SettingsController::class, 'edit']); //------------balence Route::post('getBalance', [DashboardController::class, 'getBalance']); //------------PriceTrigger Route::post('price_triggers/table', [AdminPriceTriggerController::class, 'table']); Route::post('price_triggers', [AdminPriceTriggerController::class, 'store']); Route::put('price_triggers/{id}', [AdminPriceTriggerController::class, 'update']); Route::put('price_triggers/{id}/toggle', [AdminPriceTriggerController::class, 'toggleActive']); Route::delete('price_triggers/{id}', [AdminPriceTriggerController::class, 'destroy']); //------------AppNotifications Route::post('app_notifications/table', [AdminAppNotificationController::class, 'table']); Route::get('app_notifications/audience-options', [AdminAppNotificationController::class, 'audienceOptions']); Route::get('app_notifications/search-customers', [AdminAppNotificationController::class, 'searchCustomers']); Route::post('app_notifications/preview-audience', [AdminAppNotificationController::class, 'previewAudience']); Route::post('app_notifications', [AdminAppNotificationController::class, 'store']); Route::put('app_notifications/{id}', [AdminAppNotificationController::class, 'update']); Route::put('app_notifications/{id}/toggle', [AdminAppNotificationController::class, 'toggleActive']); Route::get('app_notifications/{id}/readers', [AdminAppNotificationController::class, 'readers']); Route::get('app_notifications/{id}/recipients', [AdminAppNotificationController::class, 'recipients']); Route::delete('app_notifications/{id}', [AdminAppNotificationController::class, 'destroy']); //------------ConditionalOrder Route::post('conditional_orders/table', [\App\Http\Controllers\Admin\ConditionalOrderController::class, 'table']); Route::post('conditional_orders', [\App\Http\Controllers\Admin\ConditionalOrderController::class, 'store']); Route::put('conditional_orders/{id}', [\App\Http\Controllers\Admin\ConditionalOrderController::class, 'update']); Route::put('conditional_orders/{id}/toggle', [\App\Http\Controllers\Admin\ConditionalOrderController::class, 'toggleActive']); Route::delete('conditional_orders/{id}', [\App\Http\Controllers\Admin\ConditionalOrderController::class, 'destroy']); //-----------product Route::post('/product/table', [ProductController::class, 'tableProduct']); Route::post('/product/archive/table', [ProductController::class, 'archiveTable']); Route::get('/product/archive/{id}', [ProductController::class, 'archive']); Route::get('/product/active/{id}',[ProductController::class, 'active']); Route::get('/product/hide/{id}',[ProductController::class, 'hide']); Route::get('/product/credit',[ProductController::class, 'listProductCredit']); Route::get('/product/list',[ProductController::class, 'listProduct']); Route::get('/product/open_sell/{id}',[ProductController::class, 'openSell']); Route::get('/product/open_buy/{id}',[ProductController::class, 'openBuy']); Route::get('/product/auto_sell/{id}',[ProductController::class, 'auto_sell']); Route::get('/product/auto_buy/{id}',[ProductController::class, 'auto_buy']); Route::get('/product/auto/{method}/{action}',[ProductController::class, 'auto_group']); Route::prefix('products/quick')->group(function () { Route::get('activation-snapshot', [ProductController::class, 'activationSnapshotStatus']); Route::post('deactivate-all', [ProductController::class, 'deactivateAllProducts']); Route::post('restore-activation', [ProductController::class, 'restoreActivationSnapshot']); Route::post('close-buy', [ProductController::class, 'closeAllBuy']); Route::post('close-sell', [ProductController::class, 'closeAllSell']); Route::post('sync-show', [ProductController::class, 'syncProductShow']); }); Route::get('/getProduct/{id}',[ProductController::class, 'getProduct']); Route::put('/products',[ProductController::class, 'editProducts']); Route::delete('/product/{id}', [ProductController::class, 'destroy']); Route::resource('/product',ProductController::class)->except(['destroy']); //--------const Route::get('/const/key/{key}',[ConstController::class, 'showValue']); Route::post('/const/table',[ConstController::class, 'table']); Route::resource('/const',ConstController::class); //--------user Route::get('/me',[UserController::class,'me']); Route::get('/user/type/{user_type}',[UserController::class,'getByUserType']); Route::post('/me/update',[UserController::class,'updateMe']); Route::post('/user/table',[UserController::class,'table']); Route::get('/user/list',[UserController::class,'listUser']); Route::resource('/user',UserController::class); //--------customer Route::post('/customer/table',[CustomerController::class,'tableWallets']); Route::get('/customer/online',[CustomerController::class,'onlineList']); Route::get('/customer/{id}/assets',[CustomerController::class,'assetsSummary']); Route::get('/customer/active/{id}',[CustomerController::class,'active']); Route::get('/customer/archive/{id}',[CustomerController::class,'archive']); Route::get('/customer/trade/{id}',[CustomerController::class,'changeTradeActive']); Route::get('/customer/conditional_order/{id}',[CustomerController::class,'changeConditionalOrderActive']); Route::put('/customer/conditional_order_limit/{id}',[CustomerController::class,'updateConditionalOrderLimit']); Route::post('/customer/archive/table',[CustomerController::class,'archiveTable']); Route::get('/customer/is_valid/{id}',[CustomerController::class,'MakeValidByAdmin']); Route::get('/customer/list',[CustomerController::class,'listUser']); Route::post('/customers/{customer_id}/referrals',[CustomerController::class,'referrals']); Route::post('/customers/{customer_id}/funds',[CustomerController::class,'funds']); Route::put('/customer/{id}',[CustomerController::class,'updateAdmin']); Route::resource('/customer', CustomerController::class)->except(['update']); //------massages Route::post('messages/table', [MassageController::class, 'messagesTable']); Route::get('messages/functions', [MassageController::class, 'getFunctionDescriptions']); Route::post('messages/get_customer_list', [MassageController::class, 'getCustomerList']); Route::post('messages/get_customer_list/table', [MassageController::class, 'getCustomerListTable']); Route::post('messages/send_message', [MassageController::class, 'send_message']); Route::post('messages/send_customer', [MassageController::class, 'send_customer_message']); Route::resource('messages', MassageController::class); //------------single customer Route::post('/customer/single/table',[CustomerController::class,'singleCustomerTable']); Route::post('/customer/single/archive/table',[CustomerController::class,'singleArchiveTable']); //-------------wallet Route::post('/wallet/charge',[WalletController::class,'charge']); Route::post('/wallet/charge_gold',[WalletController::class,'charge_gold']); Route::post('/wallet/charge_wallet',[WalletController::class,'charge_wallet']); Route::get('/wallet/charge-targets',[WalletController::class,'chargeTargets']); Route::post('/wallet/table',[WalletController::class,'indexWallet']); Route::post('/wallet/transaction/table',[WalletController::class,'index']); Route::post('/wallet/transaction/update',[WalletController::class,'updateTransaction']); Route::post('/wallet/withdraw/table',[WalletController::class,'indexWithdraw']); Route::post('/wallet/withdraw/report',[WalletController::class,'exportWithdrawReport']); Route::put('/wallet/withdraw/{id}',[WalletController::class,'updateWithdraw']); Route::get('/wallet/withdraw/{id}',[WalletController::class,'getWithdraw']); Route::post('/wallet/withdraw/complete',[WalletController::class,'completeWithdraw']); Route::post('/wallet/withdraw_physical/table',[WalletController::class,'indexPhysicalWithdraw']); Route::get('/wallet/withdraw_physical/options/{customerId}',[WalletController::class,'physicalWithdrawOptions']); Route::post('/wallet/withdraw_physical',[WalletController::class,'createPhysicalWithdraw']); Route::get('/wallet/withdraw_physical/{id}/adjust-info',[WalletController::class,'physicalWithdrawAdjustInfo']); Route::post('/wallet/withdraw_physical/{id}/adjust',[WalletController::class,'adjustPhysicalWithdraw']); //---------------order Route::post('order/table', [OrderController::class, 'table']); Route::post('order/single/table', [OrderController::class, 'singleOrderTable']); Route::post('single/order', [SingleOrderController::class, 'store']); //-------------------price Route::post('price', [PriceController::class, 'store']); Route::post('price/table', [PriceController::class, 'table']); Route::post('prices', [PriceController::class, 'priceData']); Route::post('prices/chart', [PriceController::class, 'chartPrices']); Route::post('price-sync-logs/table', [PriceSyncLogController::class, 'table']); Route::get('price-sync-logs/{id}', [PriceSyncLogController::class, 'show']); Route::post('price-sync/run', [PriceSyncLogController::class, 'runSync']); Route::get('zaarbox/products', [PriceController::class, 'zaarboxProducts']); Route::post('finance', [FinanceController::class, 'fall']); //dashboard Route::post('dashboard/finance', [DashboardController::class, 'finance']); Route::get('dashboard', [DashboardController::class, 'dashboardMaster']); Route::post('dashboard', [DashboardController::class, 'dashboardMaster']); Route::post('gateway', [DashboardController::class, 'gateway']); Route::post('dashboard/customer/all_sell', [DashboardController::class, 'sumSellToCustomerMajor']); Route::post('dashboard/customer/single/all_sell', [DashboardController::class, 'sumSellToCustomerSingle']); Route::post('dashboard/customer/flow', [DashboardController::class, 'flow']); Route::post('dashboard/customer/order-peak-hours', [DashboardController::class, 'orderPeakHours']); // سند تبدیل سود ریالی به طلا Route::post('dashboard/profit-conversions', [DashboardController::class, 'profitConversions']); Route::post('dashboard/profit-conversions/store', [DashboardController::class, 'storeProfitConversion']); Route::delete('dashboard/profit-conversions/{id}', [DashboardController::class, 'deleteProfitConversion']); //bank account Route::post('account/table', [BankAccountController::class, 'table']); Route::get('account/{id}', [BankAccountController::class, 'show']); Route::post('account/sts', [BankAccountController::class, 'changeSts']); Route::delete('account/{id}', [BankAccountController::class, 'destroy']); Route::post('wallet/tahesab', [TahesabController::class, 'wallet']); Route::post('tahesab/table', [TahesabController::class, 'table']); Route::get('tahesab/customer-sync/status', [TahesabController::class, 'customerSyncStatus']); Route::post('tahesab/customer-sync/panel-to-tahesab', [TahesabController::class, 'syncPanelToTahesab']); Route::post('tahesab/customer-sync/import-from-tahesab', [TahesabController::class, 'importFromTahesab']); Route::post('tahesab/customer-sync/rollback-import', [TahesabController::class, 'rollbackImport']); Route::get('tahesab/{id}', [TahesabController::class, 'show']); Route::post('tahesab/{id}/retry', [TahesabController::class, 'retrySanad']); Route::post('customer/{id}/tahesab/register', [TahesabController::class, 'registerCustomer']); Route::get('zarin/health', [ZarinController::class, 'healthCheck']); Route::post('wallet/zarin', [ZarinController::class, 'wallet']); Route::post('zarin/table', [ZarinController::class, 'table']); // status با query روی بعضی سرورها QUERY_STRING خالی است — مسیر جدا برای لیست زرین Route::get('zarin/customer-sync/status-with-zarin', [ZarinController::class, 'customerSyncStatusWithZarin']); Route::match(['get', 'post'], 'zarin/customer-sync/status', [ZarinController::class, 'customerSyncStatus']); Route::post('zarin/customer-sync/panel-to-zarin', [ZarinController::class, 'syncPanelToZarin']); Route::post('zarin/customer-sync/import-from-zarin', [ZarinController::class, 'importFromZarin']); Route::post('zarin/customer-sync/rollback-import', [ZarinController::class, 'rollbackImport']); Route::get('zarin/{id}', [ZarinController::class, 'show']); Route::post('zarin/{id}/retry', [ZarinController::class, 'retrySanad']); Route::post('customer/{id}/zarin/register', [ZarinController::class, 'registerCustomer']); Route::post('pargar/table', [PargarController::class, 'table']); Route::get('pargar/customer-sync/status', [PargarController::class, 'customerSyncStatus']); Route::get('pargar/stuck-outbound', [PargarController::class, 'stuckOutbound']); Route::post('pargar/customer-sync/panel-to-pargar', [PargarController::class, 'syncPanelToPargar']); Route::post('pargar/customer-sync/import-from-pargar', [PargarController::class, 'importFromPargar']); Route::post('pargar/customer-sync/rollback-import', [PargarController::class, 'rollbackImport']); Route::post('pargar/wallet-sync/all', [PargarController::class, 'syncAllWallets']); Route::get('pargar/{id}', [PargarController::class, 'show']); Route::post('pargar/{id}/retry', [PargarController::class, 'retrySanad']); Route::post('customer/{id}/pargar/register', [PargarController::class, 'registerCustomer']); Route::post('customer/{id}/pargar/sync-wallet', [PargarController::class, 'syncCustomerWallet']); Route::get('test', function () { $data = [ "value" => 2000, "customer_id" => 466, "note" => "test", "direction" => "0" ]; app(TahesabController::class)->wallet($data); return "OK"; } ); //Offer codes Route::post('/offer_code/table',[OfferCodesController::class, 'table']); Route::post('/offer_code/create',[OfferCodesController::class, 'store']); Route::resource('/offer_code',OfferCodesController::class); //check card Route::post('/check_card',[CustomerController::class, 'cardChecker']); //Giftcard Route::post('giftcard/generate/', [GiftCardController::class, 'redeem']); Route::post('giftcard/table/', [GiftCardController::class, 'table']); Route::get('categories', [CategoryController::class, 'index']); Route::post('categories', [CategoryController::class, 'store']); Route::post('categories/sync-from-products', [CategoryController::class, 'syncFromProducts']); Route::put('categories/{id}', [CategoryController::class, 'update']); Route::get('categories/{id}/active/{active}', [CategoryController::class, 'changeActive']); // خلاصه کیف پول پیامک برای همه ادمین‌ها (نمایش «اعتبار پیامک» در هدر) Route::get('sms-wallet/summary', [SmsPanelController::class, 'walletSummary']); Route::middleware('sms.panel.super')->prefix('sms-panel')->group(function () { Route::get('overview', [SmsPanelController::class, 'overview']); Route::post('charge', [SmsPanelController::class, 'charge']); Route::put('price', [SmsPanelController::class, 'updatePrice']); Route::put('block', [SmsPanelController::class, 'updateBlock']); Route::put('deposit-info', [SmsPanelController::class, 'updateDepositInfo']); Route::post('logs/table', [SmsPanelController::class, 'logsTable']); Route::post('ledger/table', [SmsPanelController::class, 'ledgerTable']); Route::get('report', [SmsPanelController::class, 'report']); Route::get('report/charges', [SmsPanelController::class, 'chargeReport']); }); }); });