StackFlow
Yii2 - last insert id
$lastId = Yii::$app->db->getLastInsertID();
Please enable JavaScript to view the
comments powered by Disqus.