/app/Laravel/Notifications/Social/UnfollowedNotification.php

https://bitbucket.org/cityserv/techreportph · PHP · 29 lines · 19 code · 5 blank · 5 comment · 0 complexity · db495050d211373e4568c1fcd6aa7b0f MD5 · raw file

  1. <?php
  2. namespace App\Laravel\Notifications\Social;
  3. use App\Laravel\Models\User;
  4. use App\Laravel\Notifications\MainNotification;
  5. use Helper;
  6. class UnfollowedNotification extends MainNotification
  7. {
  8. /**
  9. * Create a new notification instance.
  10. *
  11. * @return void
  12. */
  13. public function __construct(User $follower)
  14. {
  15. $data = [
  16. 'type' => "USER",
  17. 'reference_id' => $follower->id,
  18. 'title' => Helper::get_response_message("UNFOLLOWED_NOTIFICATION_TITLE"),
  19. 'content' => Helper::get_response_message("UNFOLLOWED_NOTIFICATION_CONTENT", ['name' => $follower->name]),
  20. 'thumbnail' => $follower->getAvatar(),
  21. ];
  22. $this->setData($data);
  23. }
  24. }