Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 2 | public function __invoke($id, Request $request) |
|
20 | { |
||
21 | 2 | $this->authorize('manage', Customer::class); |
|
22 | |||
23 | 1 | $deleted = []; |
|
24 | |||
25 | // Get deleted Equipment |
||
26 | 1 | $deleted['equipment'] = CustomerEquipment::where('cust_id', $id)->onlyTrashed()->get()->makeVisible('deleted_at'); |
|
27 | |||
28 | // Get deleted Contacts |
||
29 | 1 | $deleted['contacts'] = CustomerContact::where('cust_id', $id)->onlyTrashed()->get()->makeVisible('deleted_at'); |
|
30 | |||
31 | // Get deleted Notes |
||
32 | 1 | $deleted['notes'] = CustomerNote::where('cust_id', $id)->onlyTrashed()->get()->makeVisible('deleted_at'); |
|
33 | |||
34 | // Get deleted files |
||
35 | 1 | $deleted['files'] = CustomerFile::where('cust_id', $id)->onlyTrashed()->get()->makeVisible('deleted_at'); |
|
36 | |||
37 | 1 | return $deleted; |
|
38 | } |
||
40 |