/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
- <?php
- namespace App\Laravel\Notifications\Self\Social;
- use App\Laravel\Models\User;
- use App\Laravel\Notifications\SelfNotification;
- use Helper;
- class FollowedNotification extends SelfNotification
- {
- /**
- * Create a new notification instance.
- *
- * @return void
- */
- public function __construct(User $following)
- {
- $data = [
- 'type' => "USER",
- 'reference_id' => $following->id,
- 'title' => Helper::get_response_message("SELF_FOLLOWED_NOTIFICATION_TITLE", ['name' => $following->name]),
- 'content' => Helper::get_response_message("SELF_FOLLOWED_NOTIFICATION_CONTENT", ['name' => $following->name]),
- 'thumbnail' => $following->getAvatar(),
- ];
- $this->setData($data);
- }
- }