Answers for "laravel show executed query"

PHP
3

print last query laravel

DB::enableQueryLog();

dd(DB::getQueryLog());
Posted by: Guest on August-07-2020
0

laravel print executed query

DB::enableQueryLog();
$users = User::select("*")->get();
$quries = DB::getQueryLog();
dd($quries);
DB::table('users')->toSql();
dd($query);
Posted by: Guest on February-25-2021
1

enablequerylog laravel

\DB::enableQueryLog();

dd(\DB::getQueryLog());
Posted by: Guest on December-14-2020

Code answers related to "laravel show executed query"

Browse Popular Code Answers by Language