PostCreated::broadcastOn()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Taskforcedev\LaravelForum\Events;
2
3
use Illuminate\Queue\SerializesModels;
4
use Taskforcedev\LaravelForum\Models\ForumPost;
5
6
class PostCreated extends Event
7
{
8
    use SerializesModels;
9
10
    public $user;
11
    public $post;
12
13
    public function __construct(ForumPost $post, $user)
14
    {
15
        $this->post = $post;
16
        $this->user = $user;
17
    }
18
19
    /**
20
     * Get the channels the event should be broadcast on.
21
     *
22
     * @return array
23
     */
24
    public function broadcastOn()
25
    {
26
        return ['laravel-forum'];
27
    }
28
}
29