update(['sale_rate' => $aParams['aArg'][1]]); return $this->toJson($updatedRows); // $this->oTGHttp->sendToTG(json_encode($updatedRows, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)); // $this->oHttp::response(200, 'ok'); } public function List() { $aSaleCodeList = ModelArticle::select('sale_code', 'sale_rate') ->distinct() ->orderBy("sale_code") ->get() ->toArray(); return $this->toJson($aSaleCodeList); // $this->oTGHttp->sendToTG(json_encode($aSaleCodeList, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)); // $this->oHttp::response(200, 'ok'); } public function Find($aParams) { $aSaleCodeList = ModelArticle::select('sale_code', 'sale_rate') ->where("sale_code", $aParams['aArg'][1]) ->distinct() ->orderBy("sale_code") ->get() ->toArray(); return $this->toJson($aSaleCodeList); // $this->oTGHttp->sendToTG(json_encode($aSaleCodeList, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)); // $this->oHttp::response(200, 'ok'); } }