Skip to content

Instantly share code, notes, and snippets.

@vidux
Created March 7, 2022 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vidux/1b45bd28e0ab1a958c5b344313fb8460 to your computer and use it in GitHub Desktop.
Save vidux/1b45bd28e0ab1a958c5b344313fb8460 to your computer and use it in GitHub Desktop.
laravel dump msyql quary
<?php
$el_quary // your quary from elequent
$query = str_replace(array('?'), array('\'%s\''), $el_quary->toSql());
$query = vsprintf($query, $el_quary->getBindings());
dd( $query);
//from https://stackoverflow.com/a/59403835/8926714
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment