Conditions | 3 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function __invoke(Request $request) |
||
22 | { |
||
23 | $query = Query::query(); |
||
24 | |||
25 | if ($requestId = $request->input('filter.request.id')) { |
||
26 | $query->where('request_id', $requestId); |
||
27 | } |
||
28 | if ($statementId = $request->input('filter.statement.id')) { |
||
29 | $query->where('statement_id', $statementId); |
||
30 | } |
||
31 | |||
32 | $query->with([ |
||
33 | ]); |
||
34 | |||
35 | $queries = $query->latest('id')->get(); |
||
36 | |||
37 | return new Response($queries); |
||
38 | } |
||
40 |