Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function push($title, $message, $icon, $link = null) |
||
38 | { |
||
39 | $notification = $this->notification->create([ |
||
40 | 'user_id' => $this->userId ?: $this->auth->id(), |
||
41 | 'icon_class' => $icon, |
||
42 | 'link' => $link, |
||
43 | 'title' => $title, |
||
44 | 'message' => $message, |
||
45 | ]); |
||
46 | |||
47 | if (true === config('asgard.notification.config.real-time', false)) { |
||
48 | $this->triggerEventFor($notification); |
||
49 | } |
||
50 | } |
||
51 | |||
73 |