apichef /
laravel-notify-lk
| 1 | <?php |
||
| 2 | |||
| 3 | namespace ApiChef\NotifyLK; |
||
| 4 | |||
| 5 | use Illuminate\Notifications\Notification; |
||
| 6 | |||
| 7 | class NotifyLKChannel |
||
| 8 | { |
||
| 9 | private $notifyLKClient; |
||
| 10 | |||
| 11 | 6 | public function __construct(Client $notifyLKClient) |
|
| 12 | { |
||
| 13 | 6 | $this->notifyLKClient = $notifyLKClient; |
|
| 14 | 6 | } |
|
| 15 | |||
| 16 | 6 | public function send($notifiable, Notification $notification) |
|
| 17 | { |
||
| 18 | 6 | $to = $notifiable->routeNotificationForNotifyLK($notification); |
|
| 19 | |||
| 20 | /** @var NotifyLKMessage $message */ |
||
| 21 | 6 | $message = $notification->toNotifyLK($notifiable)->to($to); |
|
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 22 | |||
| 23 | 6 | $this->notifyLKClient->send($message); |
|
| 24 | 6 | } |
|
| 25 | } |
||
| 26 |