From 663abc2b9f7feea30b0bc6b5e6bce64a9a5271f7 Mon Sep 17 00:00:00 2001 From: Victor Date: Sun, 22 Oct 2023 10:56:34 +0300 Subject: [PATCH 1/3] Warning about DB::listen --- database.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/database.md b/database.md index 4cc6ae248b4..3bb2c499a80 100644 --- a/database.md +++ b/database.md @@ -285,6 +285,8 @@ If you would like to specify a closure that is invoked for each SQL query execut } } +Inside `DB::listen` you should not perform any `INSERT` operations otherwise the Eloquent `save` method will not work correctly when saving new models in the database + ### Monitoring Cumulative Query Time From 4a88b473f5ad413096e041b3505be5ba53eb0bdb Mon Sep 17 00:00:00 2001 From: Victor Date: Sun, 22 Oct 2023 11:05:42 +0300 Subject: [PATCH 2/3] dot --- database.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database.md b/database.md index 3bb2c499a80..934d7965752 100644 --- a/database.md +++ b/database.md @@ -285,7 +285,7 @@ If you would like to specify a closure that is invoked for each SQL query execut } } -Inside `DB::listen` you should not perform any `INSERT` operations otherwise the Eloquent `save` method will not work correctly when saving new models in the database +Inside `DB::listen` you should not perform any `INSERT` operations otherwise the Eloquent `save` method will not work correctly when saving new models in the database. ### Monitoring Cumulative Query Time From 330d5f9b095337909ba21732984b78977ed53e8f Mon Sep 17 00:00:00 2001 From: Victor Date: Sun, 22 Oct 2023 11:22:54 +0300 Subject: [PATCH 3/3] Update database.md Co-authored-by: Artur Gauzer --- database.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database.md b/database.md index 934d7965752..4695d9fd0b5 100644 --- a/database.md +++ b/database.md @@ -285,7 +285,8 @@ If you would like to specify a closure that is invoked for each SQL query execut } } -Inside `DB::listen` you should not perform any `INSERT` operations otherwise the Eloquent `save` method will not work correctly when saving new models in the database. +> **Warning** +> Inside `DB::listen` you should not perform any `INSERT` operations otherwise the Eloquent `save` method will not work correctly when saving new models in the database. ### Monitoring Cumulative Query Time