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', [PriceTriggerController::class, 'table']); //-----------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::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/{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::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::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']); //---------------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']); //bank account Route::post('account/table', [BankAccountController::class, 'table']); Route::get('account/{id}', [BankAccountController::class, 'show']); Route::post('account/sts', [BankAccountController::class, 'changeSts']); 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::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('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']); }); });