| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | class Sockets implements ShouldBroadcast |
||
| 21 | { |
||
| 22 | use Dispatchable, InteractsWithSockets, SerializesModels; |
||
|
|
|||
| 23 | public $questionData; |
||
| 24 | /** |
||
| 25 | * Create a new event instance. |
||
| 26 | * |
||
| 27 | * @return void |
||
| 28 | */ |
||
| 29 | |||
| 30 | //This creates an event that is fired off to the redis server so that Laravel can communicate with the node server (and web sockets) |
||
| 31 | public function __construct($pin, $method) |
||
| 32 | { |
||
| 33 | //Each class will contain the answers and so forth.. |
||
| 34 | $this->questionData = array( |
||
| 35 | 'pin' => $pin, |
||
| 36 | 'method' => $method |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Get the channels the event should broadcast on. |
||
| 42 | * |
||
| 43 | * @return \Illuminate\Broadcasting\Channel|array |
||
| 44 | */ |
||
| 45 | public function broadcastOn() |
||
| 49 | } |
||
| 50 | } |
||
| 51 |