Skip to content

Commit

Permalink
[12.x] Adds missing streamJson() to ResponseFactory contract (laravel…
Browse files Browse the repository at this point in the history
…#51544)

* [12.x] Adds missing streamJson() to ResponseFactory contact

* Update ResponseFactory.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
wilsenhc and taylorotwell authored May 23, 2024
1 parent a7d3d29 commit 500c039
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/Illuminate/Contracts/Routing/ResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ 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 500c039

Please sign in to comment.