Getting random documents from MongoDB In Yii2
<p>How can I get N random documents from MongoDB (using Yii2)?</p>

<p>Is there some special method, like</p>

<pre><code>Products::find()-&gt;random(20)-&gt;asArray()-&gt;all()
</code></pre>