We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be3f050 commit a06a15dCopy full SHA for a06a15d
src/Outputs/Json.php
@@ -0,0 +1,19 @@
1
+<?php
2
+namespace BeyondCode\QueryDetector\Outputs;
3
+
4
+use Illuminate\Support\Collection;
5
+use Symfony\Component\HttpFoundation\Response;
6
+use Illuminate\Http\JsonResponse;
7
8
+class Json implements Output
9
+{
10
11
+ public function output(Collection $detectedQueries, Response $response)
12
+ {
13
+ if ($response instanceof JsonResponse) {
14
+ $data = $response->getData(true);
15
+ $data['warning_queries'] = $detectedQueries;
16
+ $response->setData($data);
17
+ }
18
19
+}
0 commit comments