Iam using MongoDb integration with Yii2.
when i was executing the code
public function actionSearch($sku) {
$query = new Query;
// compose the query
$query->select()
->from('products')
->where(['skus.sku' => $sku]);
$product = $query->all();
return $this->render('product', $product);
}
i got the ‘class not found’ error
“Fatal error: Class ‘yii\mongodb\Query’ not found”
how to slove it?