Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function handle() |
||
42 | { |
||
43 | $followups = Followup::where('due_date','=',Carbon::today())->get(); |
||
44 | |||
45 | $sms_trigger = Sms_trigger::where('alias','=','followup')->first(); |
||
46 | $message = $sms_trigger->message; |
||
47 | $sms_status = $sms_trigger->status; |
||
48 | $sender_id = \Utilities::getSetting('sms_sender_id'); |
||
49 | $gym_name = \Utilities::getSetting('gym_name'); |
||
50 | |||
51 | foreach ($followups as $followup) |
||
52 | { |
||
53 | $sms_text = sprintf($message,$followup->enquiry->name,$gym_name); |
||
54 | \Utilities::Sms($sender_id,$followup->enquiry->contact,$sms_text,$sms_status); |
||
55 | } |
||
58 |