D
D
DenKG2016-12-20 10:14:43
Laravel
DenKG, 2016-12-20 10:14:43

Why is the query log not being displayed?

I need to output sql query log.
I'm trying to do it this way: dd(DB::getQueryLog());
But it outputs just [].
How to fix?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nurlan, 2016-12-20
@DenKG

You most likely do not collect these same logs yet.
https://laravel.com/docs/5.0/database#query-logging
Good answer on SO

A
Alexander Aksentiev, 2016-12-20
@Sanasol

Did you turn it on before taking it out?
DB::enableQueryLog();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question