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

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

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