| 1 | <?php |
||
| 11 | class UserRegistered |
||
| 12 | { |
||
| 13 | use Dispatchable, InteractsWithSockets, SerializesModels; |
||
| 14 | |||
| 15 | public $user_id; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Create a new event instance. |
||
| 19 | * |
||
| 20 | * @return void |
||
|
|
|||
| 21 | */ |
||
| 22 | public function __construct($id) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get the channels the event should broadcast on. |
||
| 30 | * |
||
| 31 | * @return Channel|array |
||
| 32 | */ |
||
| 33 | public function broadcastOn() |
||
| 37 | } |
||
| 38 |
Adding a
@returnannotation 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.