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

https://bitbucket.org/cityserv/techreportph · PHP · 29 lines · 19 code · 5 blank · 5 comment · 0 complexity · 544a9f5e0e6b7e348f0ef1cf9e7c4d09 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 FollowedNotification 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_FOLLOWED_NOTIFICATION_TITLE", ['name' => $following->name]),
  19. 'content' => Helper::get_response_message("SELF_FOLLOWED_NOTIFICATION_CONTENT", ['name' => $following->name]),
  20. 'thumbnail' => $following->getAvatar(),
  21. ];
  22. $this->setData($data);
  23. }
  24. }