group(function (){ Route::middleware('validation')->group(function (){ Route::get('/p', function () { return Http::get('https://pricing.liman.gold/pricingApi', [])->json(); }); //------------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::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::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/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/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::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('finance', [FinanceController::class, 'fall']); //dashboard Route::post('dashboard/finance', [DashboardController::class, 'finance']); Route::get('dashboard', [DashboardController::class, 'dashboardMaster']); 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']); //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::get('test', function () { $data = [ "value" => 2000, "customer_id" => 466, "note" => "test", "direction" => "0" ]; $tahesab = new TahesabController(); try { $tahesab->wallet($data); }catch (Exception $e) { dd($e->getMessage()); } return "OK"; } ); }); });