|
4 | 4 |
|
5 | 5 | if (! function_exists('dd_sql')) {
|
6 | 6 | /**
|
7 |
| - * Dump the passed variables and end the script. |
| 7 | + * Throws a message with an SQL query. |
| 8 | + * |
| 9 | + * @param \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder $query |
| 10 | + * @param bool $is_short |
| 11 | + */ |
| 12 | + function dd_sql($query, bool $is_short = false): void |
| 13 | + { |
| 14 | + Dumper::sqlDd($query, $is_short); |
| 15 | + } |
| 16 | +} |
| 17 | + |
| 18 | +if (! function_exists('dump_sql')) { |
| 19 | + /** |
| 20 | + * Displays a message with an SQL query. |
| 21 | + * |
| 22 | + * @param \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder $query |
| 23 | + * @param bool $is_short |
| 24 | + */ |
| 25 | + function dump_sql($query, bool $is_short = false): void |
| 26 | + { |
| 27 | + Dumper::sqlDump($query, $is_short); |
| 28 | + } |
| 29 | +} |
| 30 | + |
| 31 | +if (! function_exists('sql')) { |
| 32 | + /** |
| 33 | + * Displays a message with an SQL query. |
8 | 34 | *
|
9 | 35 | * @param \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder $query
|
10 | 36 | * @param bool $is_short
|
11 |
| - * @param bool $is_return |
12 | 37 | *
|
13 | 38 | * @return array|string
|
14 | 39 | */
|
15 |
| - function dd_sql($query, bool $is_short = false, bool $is_return = false) |
| 40 | + function sql($query, bool $is_short = false) |
16 | 41 | {
|
17 |
| - return Dumper::ddSql($query, $is_short, $is_return); |
| 42 | + return Dumper::sql($query, $is_short); |
18 | 43 | }
|
19 | 44 | }
|
0 commit comments