Conditions | 4 |
Paths | 8 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function getList(Request $request) |
||
13 | { |
||
14 | $ActionLog = app('ActionLog'); |
||
15 | if ($request->has('user_id')) { |
||
16 | $ActionLog = $ActionLog->where('user_id', intval($request->input('user_id'))); |
||
17 | } |
||
18 | |||
19 | if ($request->has('client_ip')) { |
||
20 | $ActionLog = $ActionLog->where('client_ip', $request->input('client_ip')); |
||
21 | } |
||
22 | |||
23 | if ($request->has('type')) { |
||
24 | $ActionLog = $ActionLog->where('type', $request->input('type')); |
||
25 | } |
||
26 | |||
27 | $list = $ActionLog->paginate(); |
||
28 | |||
29 | return response()->json($list); |
||
30 | } |
||
31 | } |
||
32 |