PageRenderTime 23ms CodeModel.GetById 14ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

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