private static function insert(Building $model) { $db = Database::getInstance('app'); $query = "INSERT INTO users (name) VALUES (:name);"; $result = $db->prepare($query); $result->execute([':name' => $model->getName()]); $model->setId($db->lastId()); }