You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.0 KiB

  1. <?php
  2. namespace App\Notifications;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Contracts\Queue\ShouldQueue;
  5. use Illuminate\Notifications\Messages\MailMessage;
  6. use Illuminate\Notifications\Notification;
  7. class SmsNotification extends Notification
  8. {
  9. use Queueable;
  10. public $message;
  11. public $type;
  12. /**
  13. * Create a new notification instance.
  14. *
  15. * @return void
  16. */
  17. public function __construct($message, $type = 'MessageSend')
  18. {
  19. $this->message = $message;
  20. $this->type = $type;
  21. }
  22. /**
  23. * Get the notification's delivery channels.
  24. *
  25. * @param mixed $notifiable
  26. * @return array
  27. */
  28. public function via($notifiable)
  29. {
  30. return ['sms'];
  31. }
  32. /**
  33. * Get the array representation of the notification.
  34. *
  35. * @param mixed $notifiable
  36. * @return array
  37. */
  38. public function toSms($notifiable)
  39. {
  40. return [
  41. ];
  42. }
  43. public function getType()
  44. {
  45. return $this->type;
  46. }
  47. }