Skip to content

Commit

Permalink
dump/dd
Browse files Browse the repository at this point in the history
  • Loading branch information
tpetry committed Jun 20, 2023
1 parent 3044f37 commit bee3dda
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Database/Eloquent/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ class Builder implements BuilderContract
'avg',
'count',
'dd',
'ddRawSql',
'doesntExist',
'doesntExistOr',
'dump',
'dumpRawSql',
'exists',
'existsOr',
'explain',
Expand All @@ -115,8 +117,8 @@ class Builder implements BuilderContract
'raw',
'rawValue',
'sum',
'toRawSql',
'toSql',
'toRawSql',
];

/**
Expand Down
22 changes: 22 additions & 0 deletions src/Illuminate/Database/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3910,6 +3910,18 @@ public function dump()
return $this;
}

/**
* Dump the raw current SQL with embedded bindings.
*
* @return $this
*/
public function dumpRawSql()
{
dump($this->toRawSql());

return $this;
}

/**
* Die and dump the current SQL and bindings.
*
Expand All @@ -3920,6 +3932,16 @@ public function dd()
dd($this->toSql(), $this->getBindings());
}

/**
* Die and dump the current SQL with embedded bindings.
*
* @return never
*/
public function ddRawSql()
{
dd($this->toRawSql());
}

/**
* Handle dynamic method calls into the method.
*
Expand Down

0 comments on commit bee3dda

Please sign in to comment.