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