| 1 | <?php |
||
| 14 | class PaymentEvent |
||
| 15 | { |
||
| 16 | use Dispatchable, InteractsWithSockets, SerializesModels; |
||
| 17 | |||
| 18 | public $payment; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Create a new event instance. |
||
| 22 | * |
||
| 23 | * @return void |
||
|
|
|||
| 24 | */ |
||
| 25 | public function __construct(Payment $payment) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get the channels the event should broadcast on. |
||
| 32 | * |
||
| 33 | * @return Channel|array |
||
| 34 | */ |
||
| 35 | public function broadcastOn() |
||
| 39 | } |
||
| 40 |
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.