Skip to content

Commit 86b6380

Browse files
committed
Adding notes about query logging to readme
1 parent dddf711 commit 86b6380

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,3 +313,9 @@ You can also perform an unset on a model.
313313
You may easily cache the results of a query using the remember method:
314314

315315
$users = User::remember(10)->get();
316+
317+
### Query Logging
318+
319+
By default, Laravel keeps a log in memory of all queries that have been run for the current request. However, in some cases, such as when inserting a large number of rows, this can cause the application to use excess memory. To disable the log, you may use the `disableQueryLog` method:
320+
321+
DB::connection()->disableQueryLog();

0 commit comments

Comments
 (0)