How to create good database select with yii2 activeRecord object from this mysql query?

I have got mysql query, how I can take this data with yii2 activeRecord objects?


SELECT *

FROM `sel_posts`

WHERE `login_id` = 22 OR 23 OR 24 ... (this ids from array $ifollow)

ORDER BY `datetime` DESC

LIMIT 0 , 20

How I can do that?

Classname::find()->limit(20)->where([‘in’,‘login_id’, $ifollow])->orderBy([‘datetime’ => SORT_DESC])->all()