| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class MachineUpdatedEvent extends Event implements ShouldBroadcast |
||
| 18 | { |
||
| 19 | public $listeners = []; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var Machine |
||
| 23 | */ |
||
| 24 | public $machine; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * UserRegisteredEvent constructor. |
||
| 28 | * |
||
| 29 | * @param $user |
||
| 30 | */ |
||
| 31 | public function __construct(Machine $machine) |
||
| 32 | { |
||
| 33 | $this->machine = $machine; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function broadcastOn() |
||
| 37 | { |
||
| 38 | return new PrivateChannel('user.' . $this->machine->user_id); |
||
|
|
|||
| 39 | } |
||
| 40 | |||
| 41 | public function broadcastAs() |
||
| 42 | { |
||
| 43 | return 'machine.updated'; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function broadcastWith() |
||
| 49 | } |
||
| 50 | } |
||
| 51 |