Downloads
Stars
Version
This package makes it easy to send notifications using RayganSms API with Laravel 5.3+.
با استفاده از composer قادر به نصب این سرویس می باشید:
composer require trezrayan/raygan-sms-notification-channel
با استفاده از متد ()via
این کانال را به notefication خود اضافه نموده و متد toRayganSms را مطابق زیر جهت ارسال اعلان اضافه می نماییم:
use Illuminate\Notifications\Notification;
use NotificationChannels\RayganSms\RaygansmsChannel;
use NotificationChannels\RayganSms\TextMessage;
use NotificationChannels\RayganSms\AuthCodeMessage;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [RayganSmsChannel::class];
}
public function toRayganSms($notifiable)
{
return (new TextMessage)
->content("your message to send ...");
}
}
...
public function toRayganSms($notifiable)
{
return (new AuthCodeMessage)
->content('Welcome');
}
...
...
public function toRayganSms($notifiable)
{
return (new AuthCodeMessage)
->content('کد تایید شما : 325689')
->autoGenerate(false);
}
use Notifiable;
public function routeNotificationForRayganSms()
{
return $this->phone_number;
}
لایسنس این پکیج (MIT) می باشد . جهت اطلاعات در مورد این لایسنس به License File مراجعه نمایید.