Listen database operation and dump the sql query
DB::listen(function($query) { var_dump($query->sql); });