Laravel query logging is a one of debugging SQL query mode. If you have any problem with your query at run time and you can not see the SQL query that what exactly running then you need to query logging.
First you need to enable query logging such as-
To get an array of the executed queries, you may use the getQueryLog method:
$query_log = DB::getQueryLog();
dd($query_log ) or print_r($query_log );
And finally you can see the query log.

News Reporter
IT Software and web development, Core PHP, JavaScript, JQuery, HTML, CSS, CakePHP, Angularjs, Codeigniter etc.

Leave a Reply

Your email address will not be published. Required fields are marked *