Query builder what were you thinking?!
A handy code snippet for finding out exactly what sql the Laravel 4 query builder was trying to run:
Or, an even better option - install https://github.com/barryvdh/laravel-debugbar - and easily access all the DB queries run for a given page.
$queries = DB::getQueryLog();
$last_query = end($queries);
dd($last_query);
EDIT -14/11/2013Or, an even better option - install https://github.com/barryvdh/laravel-debugbar - and easily access all the DB queries run for a given page.
Comments
Post a Comment