yii\db\Schema::getLastInsertID PHP Метод

getLastInsertID() публичный Метод

Returns the ID of the last inserted row or sequence value.
См. также: http://www.php.net/manual/en/function.PDO-lastInsertId.php
public getLastInsertID ( string $sequenceName = '' ) : string
$sequenceName string name of the sequence object (required by some DBMS)
Результат string the row ID of the last row inserted, or the last value retrieved from the sequence object
    public function getLastInsertID($sequenceName = '')
    {
        if ($this->db->isActive) {
            return $this->db->pdo->lastInsertId($sequenceName === '' ? null : $this->quoteTableName($sequenceName));
        } else {
            throw new InvalidCallException('DB Connection is not active.');
        }
    }