1 | <?php |
||
17 | class SendReminders extends Command |
||
18 | { |
||
19 | /** |
||
20 | * The name and signature of the console command. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $signature = 'emails:reminders'; |
||
25 | |||
26 | /** |
||
27 | * The console command description. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $description = 'Sends out email reminders a week before they are due.'; |
||
32 | |||
33 | /** |
||
34 | * @var |
||
35 | */ |
||
36 | protected $trainingUsers; |
||
37 | /** |
||
38 | * @var |
||
39 | */ |
||
40 | protected $visits; |
||
41 | |||
42 | /** |
||
43 | * Execute the console command. |
||
44 | * Sends out reminder emails to all employees. Then sends a reminder to their supervisor. |
||
45 | * |
||
46 | * @return mixed |
||
47 | */ |
||
48 | public function handle() |
||
59 | |||
60 | /** |
||
61 | * Email the employee's supervisor if a user has training that isn't complete yet. |
||
62 | */ |
||
63 | public function emailSupervisor() |
||
84 | |||
85 | /** |
||
86 | * Stores a list of incomplete training. |
||
87 | */ |
||
88 | public function setTrainingUsers() |
||
99 | |||
100 | /** |
||
101 | * Stores a list of visits that are due to expire sometime between yesterday and the next week. |
||
102 | */ |
||
103 | public function setVisits() |
||
113 | |||
114 | /** |
||
115 | * Get our Notes list. |
||
116 | * |
||
117 | * @return mixed |
||
118 | */ |
||
119 | public function gettrainingUsers() |
||
123 | |||
124 | /** |
||
125 | * Get our Visits list. |
||
126 | * |
||
127 | * @return mixed |
||
128 | */ |
||
129 | public function getVisits() |
||
133 | |||
134 | /** |
||
135 | * Take a list of notes and return a list of supervisors related to those notes. |
||
136 | * |
||
137 | * @return Collection |
||
138 | */ |
||
139 | private function getSupervisors() |
||
150 | } |
||
151 |