Completed
Push — master ( 828a77...6ea8ec )
by UP805717
14:01
created

addUser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A broadcastOn() 0 3 1
1
<?php
2
3
namespace App\Events;
4
5
use Illuminate\Broadcasting\Channel;
6
use Illuminate\Queue\SerializesModels;
7
use Illuminate\Broadcasting\PrivateChannel;
8
use Illuminate\Broadcasting\PresenceChannel;
9
use Illuminate\Foundation\Events\Dispatchable;
10
use Illuminate\Broadcasting\InteractsWithSockets;
11
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
12
13
class addUser implements ShouldBroadcast
14
{
15
    use Dispatchable, InteractsWithSockets, SerializesModels;
16
    public $user;
17
    /**
18
     * Create a new event instance.
19
     *
20
     * @return void
21
     */
22
    public function __construct($username)
23
    {
24
        //Each class will contain the answers and so forth..
25
        $this->user = array(
26
             'name' => $username
27
         );
28
    }
29
30
    /**
31
     * Get the channels the event should broadcast on.
32
     *
33
     * @return \Illuminate\Broadcasting\Channel|array
34
     */
35
     public function broadcastOn()
36
     {
37
         return ['addUser'];
38
     }
39
}
40