Skip to content

Commit 8defbc6

Browse files
authored
Make BuildsQueries::tap consistent with other versions of tap (#38359)
1 parent 94c1b8a commit 8defbc6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Illuminate/Database/Concerns/BuildsQueries.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,12 @@ protected function cursorPaginator($items, $perPage, $cursor, $options)
422422
* Pass the query to a given callback.
423423
*
424424
* @param callable $callback
425-
* @return $this|mixed
425+
* @return $this
426426
*/
427427
public function tap($callback)
428428
{
429-
return $this->when(true, $callback);
429+
$callback($this);
430+
431+
return $this;
430432
}
431433
}

0 commit comments

Comments
 (0)