Skip to content

Commit 9807448

Browse files
authored
Add parameter to afterResponse method (#58099)
A quality of life improvement that allows the afterResponse option to be set conditionally, to simplify call site code.
1 parent 7505152 commit 9807448

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Illuminate/Foundation/Bus/PendingDispatch.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,12 @@ public function chain($chain)
184184
/**
185185
* Indicate that the job should be dispatched after the response is sent to the browser.
186186
*
187+
* @param bool $afterResponse
187188
* @return $this
188189
*/
189-
public function afterResponse()
190+
public function afterResponse($afterResponse = true)
190191
{
191-
$this->afterResponse = true;
192+
$this->afterResponse = $afterResponse;
192193

193194
return $this;
194195
}

0 commit comments

Comments
 (0)