| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function remindPendingAttendance() |
||
| 15 | { |
||
| 16 | $period = Period::get_default_period(); |
||
| 17 | foreach (Teacher::all() as $teacher) { |
||
| 18 | $events = $teacher->events_with_pending_attendance($period) |
||
|
|
|||
| 19 | ->where('start', '<', (Carbon::parse('24 hours ago'))->toDateTimeString()); |
||
| 20 | |||
| 21 | if ($events->count() > 0) { |
||
| 22 | Mail::to($teacher->email) |
||
| 23 | ->locale('fr') |
||
| 24 | ->queue(new PendingAttendanceReminder($teacher, $events)); |
||
| 25 | } |
||
| 29 |