1 | <?php |
||
16 | class LaravelResponseFactory implements ResponseFactory |
||
17 | { |
||
18 | /** |
||
19 | * The Laravel factory for making responses. |
||
20 | * |
||
21 | * @var \Illuminate\Contracts\Routing\ResponseFactory |
||
22 | */ |
||
23 | protected $factory; |
||
24 | |||
25 | /** |
||
26 | * Construct the factory class. |
||
27 | * |
||
28 | * @param \Illuminate\Contracts\Routing\ResponseFactory $factory |
||
29 | */ |
||
30 | 56 | public function __construct(BaseLaravelResponseFactory $factory) |
|
34 | |||
35 | /** |
||
36 | * Generate a JSON response. |
||
37 | * |
||
38 | * @param array $data |
||
39 | * @param int $status |
||
40 | * @param array $headers |
||
41 | * @return \Illuminate\Http\JsonResponse |
||
42 | */ |
||
43 | 56 | public function make(array $data, int $status, array $headers = []): JsonResponse |
|
47 | } |