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.

48 lines
924 B

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