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