Created
November 10, 2023 06:32
-
-
Save susilolab/51cfab6b3dfc246a42df9d083144ef32 to your computer and use it in GitHub Desktop.
Log query beserta paramternya pada query builder di laravel 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Sebelum query aktifkan log query | |
DB::enableQueryLog(); | |
$query = DB::table('demo')->where('id', '=', 1); | |
// Setelah query get lognya. | |
Log::error(print_r(DB::getQueryLog(), true)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment