get insert ID in codeigniter 4 code example Example: codeigniter last insert id $last_inserted_id = $this->db->insert_id();