goszowski / lifecell-notification-channel
Lifecell Notification Channel
dev-master
2022-05-26 12:34 UTC
Requires
- php: >=8.0
- illuminate/notifications: ~6.0 || ~7.0 || ~8.0 || ~9.0
- illuminate/support: ~6.0 || ~7.0 || ~8.0 || ~9.0
Requires (Dev)
- mockery/mockery: ^1.0
- phpunit/phpunit: ^9.0
This package is not auto-updated.
Last update: 2024-11-08 22:27:21 UTC
README
Потрібно додати в конфіг services блок:
'lifecell' => [
'endpoint' => env('LIFECELL_ENDPOINT', 'https://api.omnicell.com.ua/ip2sms/'),
'username' => env('LIFECELL_USERNAME'),
'password' => env('LIFECELL_PASSWORD'),
],
В модель User додати:
public function routeNotificationForLifecell()
{
return $this->phone;
}
Приклад Notification:
public function via($notifiable)
{
return ['lifecell'];
}
public function toLifecell($notifiable)
{
return (new LifecellMessage('Have a nice day!'));
}