@ligonsker It seems right. If you add a type hint, it will be better.
For example:
class MyEvent
{
public SomePropertyType $some_property;
public SomeOtherPropertyType $some_other_property;
public function __construct(SomePropertyType $some_property, SomeOtherPropertyType $some_other_property)
{
$this->some_property = $some_property;
$this->some_other_property = $some_other_property;
}
// rest of the event . . .
}
Have you checked this? https://laravel.com/docs/events#defining-listeners