Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / path_insert.twig
index 6fff30793618bd7bfb1a37c7fcaec464ccc9af00..5d6f27c8a42edfef122536d4fbb761cb2971d447 100644 (file)
@@ -2,7 +2,7 @@
  * Implements hook_path_insert().
  */
 function {{ machine_name }}_path_insert($path) {
-  db_insert('mytable')
+  \Drupal::database()->insert('mytable')
     ->fields([
       'alias' => $path['alias'],
       'pid' => $path['pid'],