common/repositories/ResellersRepository.php
/**
    * @param reseller id
    * @return new resellers resourse
    */
@param reseller id
@return new resellers resourse
@param reseller id @return new resellers resourse
public function updateReseller($reseller){
        $data = $this->reseller_fee->find()->where(['id'=>$reseller['id']])->one();
        $data->amount = $reseller['amount'];
        $data->percent = $reseller['percent'];
        $data->status = $reseller['status'];
        $data->user_id = $reseller['user_id'];
        if($data->save(false)){
            return true;
        }
        return false;
    }
public function updateReseller ( $ reseller ) { $ data = $ this -> reseller_fee -> find ( ) -> where ( [ 'id' => $ reseller [ 'id' ] ] ) -> one ( ) ; $ data -> amount = $ reseller [ 'amount' ] ; $ data -> percent = $ reseller [ 'percent' ] ; $ data -> status = $ reseller [ 'status' ] ; $ data -> user_id = $ reseller [ 'user_id' ] ; if ( $ data -> save ( false ) ) { return true ; } return false ; }
@param reseller id
 @return new resellers resourse
@param reseller id @return new resellers resourse