| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function handle($export) |
||
| 12 | { |
||
| 13 | return $export->sheet('User-Training', function ($sheet) { |
||
| 14 | $trainings = Training::all(); |
||
| 15 | $users = User::skipSystem()->with([ |
||
| 16 | 'assignedTrainings' => function ($q) { |
||
| 17 | $q->whereNotNull('completed_date')->orderBy('completed_date', 'desc'); |
||
| 18 | }, |
||
| 19 | ])->active()->orderBy('last_name')->get(); |
||
| 20 | |||
| 21 | $sheet->loadView('report.completed_training', ['users' => $users, 'trainings' => $trainings]); |
||
| 22 | })->download('xlsx'); |
||
| 23 | } |
||
| 24 | } |
||
| 25 |