Skip to content

Commit

Permalink
[12.x] Adds missing streamJson() to ResponseFactory contact
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsenhc committed May 23, 2024
1 parent a7d3d29 commit e5fe4ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/Illuminate/Contracts/Routing/ResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ public function jsonp($callback, $data = [], $status = 200, array $headers = [],
*/
public function stream($callback, $status = 200, array $headers = []);


/**
* Create a new streamed JSON response instance.
*
* @param array $data
* @param int $status
* @param array $headers
* @param int $encodingOptions
* @return \Symfony\Component\HttpFoundation\StreamedJsonResponse
*/
public function streamJson($data, $status = 200, $headers = [], $encodingOptions = 15);

/**
* Create a new streamed response instance as a file download.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/ResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function stream($callback, $status = 200, array $headers = [])
}

/**
* Create a new streamed response instance.
* Create a new streamed JSON response instance.
*
* @param array $data
* @param int $status
Expand Down

0 comments on commit e5fe4ec

Please sign in to comment.