| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function handle(JobSaved $event) |
||
| 28 | { |
||
| 29 | $job = $event->job; |
||
| 30 | |||
| 31 | // If the job poster status has changed to 'assessment' then send email |
||
| 32 | if ($job->isDirty('job_poster_status_id') && $job->job_poster_status->key === 'assessment') { |
||
| 33 | $manager_email = $job->manager->user->email; |
||
| 34 | if (isset($manager_email)) { |
||
| 35 | Mail::to($manager_email)->send(new ScreenCandidatesPrompt($job)); |
||
| 36 | } else { |
||
| 37 | Log::error('The screen applicants email to manager has not been set.'); |
||
| 38 | } |
||
| 42 |