where(['status' => Product::STATUS_ACTIVE, 'category_id' => $category_id]) ->select(['id', 'name', 'description', 'price']) ->all(); } public function actionGetById($id) { return Product::find() ->where(['status' => Product::STATUS_ACTIVE, 'id' => $id]) ->select(['id', 'name', 'description', 'price']) ->one(); } }