Skip to content

Commit 847f436

Browse files
author
Andrey Helldar
committed
Fixed helper
1 parent 7d8c386 commit 847f436

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

Diff for: helpers/dumper.php

+29-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,41 @@
44

55
if (! function_exists('dd_sql')) {
66
/**
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.
834
*
935
* @param \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder $query
1036
* @param bool $is_short
11-
* @param bool $is_return
1237
*
1338
* @return array|string
1439
*/
15-
function dd_sql($query, bool $is_short = false, bool $is_return = false)
40+
function sql($query, bool $is_short = false)
1641
{
17-
return Dumper::ddSql($query, $is_short, $is_return);
42+
return Dumper::sql($query, $is_short);
1843
}
1944
}

0 commit comments

Comments
 (0)