| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function send($notifiable, Notification $notification) |
||
| 18 | { |
||
| 19 | $message = $notification->toSms($notifiable); |
||
| 20 | |||
| 21 | // Validate the message. |
||
| 22 | $this->validate($message); |
||
| 23 | |||
| 24 | $manager = new SmsManager; |
||
| 25 | |||
| 26 | // Use custom driver if exists. |
||
| 27 | if (!empty($message['driver'])) { |
||
| 28 | $manager->withDriver($message['driver']); |
||
| 29 | } |
||
| 30 | |||
| 31 | // Send notification. |
||
| 32 | return $manager->send($message['body'], function ($sms) use ($message) { |
||
| 33 | $sms->to($message['recipients']); |
||
| 34 | }); |
||
| 35 | } |
||
| 36 | |||
| 54 |