1 | <?php |
||
15 | class NewMessage implements ShouldBroadcast |
||
16 | { |
||
17 | use InteractsWithSockets, SerializesModels; |
||
18 | |||
19 | /** |
||
20 | * The name of the queue on which to place the event. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | public $broadcastQueue = 'mardin'; |
||
25 | |||
26 | /** |
||
27 | * @var array Channels for message. |
||
28 | */ |
||
29 | private $channels; |
||
30 | |||
31 | /** |
||
32 | * @var Message Message. |
||
33 | */ |
||
34 | public $message; |
||
35 | |||
36 | /** |
||
37 | * Create a new event instance. |
||
38 | * |
||
39 | * @return void |
||
|
|||
40 | */ |
||
41 | public function __construct(Message $message) |
||
46 | |||
47 | /** |
||
48 | * The event's broadcast name. |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | public function broadcastAs() |
||
56 | |||
57 | /** |
||
58 | * Get the channels the event should broadcast on. |
||
59 | * |
||
60 | * @return Channel|array |
||
61 | */ |
||
62 | public function broadcastOn() |
||
79 | } |
||
80 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.