How to get last inserted record ID in YII2


(Srikanth Maggidi14) #1

Yii2: By using following statement you can get last inserted record ID.


Yii::$app->db->getLastInsertID()