public function update(Request $request) { $request_attributes = $this->validateAndReturn($request, $this->getValidationRules()); Log::debug("\$request_attributes=" . json_encode($request_attributes, 192)); PlatformAdminMeta::setMulti($request_attributes); return view('platformAdmin::xchain.settings.update', []); }
protected function requireBalanceByID($id) { $all_balances = PlatformAdminMeta::get('xchain_balances', []); if (!isset($all_balances[$id])) { throw new HttpResponseException(response('Resource not found', 404)); } return $all_balances[$id]; }
public function updateXChainMockBalances() { $balances_by_address = []; $xchain_balances = PlatformAdminMeta::get('xchain_balances', []); foreach ($xchain_balances as $address_id => $xchain_balance_entry) { self::$XCHAIN_CLIENT_MOCK_BUILDER->setBalances($xchain_balance_entry['balances'], $xchain_balance_entry['id']); $balances_by_address[$xchain_balance_entry['address']] = $xchain_balance_entry['balances']; } self::$XCHAIN_CLIENT_MOCK_BUILDER->setBalancesByAddress($balances_by_address); }
/** * Register any application services. * * @return void */ public function register() { $this->app->bind('platformAdmin.platformAdminAuth', function ($app) { return $app->make('Tokenly\\PlatformAdmin\\Middleware\\AuthenticatePlatformAdmin'); }); if (env('PLATFORM_ADMIN_DEVELOPMENT_MODE_ENABLED') and PlatformAdminMeta::get('xchainMockActive')) { $this->initXChainMock(); $this->app->bind(\Tokenly\XChainClient\Client::class, function ($app) { return $this->xchain_client_mock; }); } }