common/modules/api_v1/v1/controllers/ResellerController.php
/**
     * Returns avaliable products list
     *
     * @return mixed
     */
Returns avaliable products list
@return mixed
Returns avaliable products list @return mixed
public function actionListProducts($offset = 0, $limit = 0)
    {
        $products = Product::find();
        $total = $products->count();
        if ($offset > 0) {
            $products->offset($offset);
        }
        if ($limit > 0) {
            $products->limit($limit);
        }
        return [
            'total' => $total,
            'count' => $products->count(),
            'products' => $products->all()
        ];
    }
public function actionListProducts ( $ offset = 0 , $ limit = 0 ) { $ products = Product :: find ( ) ; $ total = $ products -> count ( ) ; if ( $ offset > 0 ) { $ products -> offset ( $ offset ) ; } if ( $ limit > 0 ) { $ products -> limit ( $ limit ) ; } return [ 'total' => $ total , 'count' => $ products -> count ( ) , 'products' => $ products -> all ( ) ] ; }
Returns avaliable products list
 @return mixed
Returns avaliable products list @return mixed