PageRenderTime 12ms CodeModel.GetById 6ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 3namespace App\Laravel\Notifications\Self\Social;
 4
 5use App\Laravel\Models\User;
 6use App\Laravel\Notifications\SelfNotification;
 7use Helper;
 8
 9class UnfollowedNotification 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_UNFOLLOWED_NOTIFICATION_TITLE", ['name' => $following->name]),
23            'content' => Helper::get_response_message("SELF_UNFOLLOWED_NOTIFICATION_CONTENT", ['name' => $following->name]),
24            'thumbnail' => $following->getAvatar(),
25        ];
26
27        $this->setData($data);
28    }
29}