CheckProjectExpireNotification.php 1.1 KB

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