Skip to content

[LiveComponent] Feature Request: Make #[LiveListener] repeatable #1323

@barbieswimcrew

Description

@barbieswimcrew

Hey folks! Wouldn't it make sense to make the #[LiveListener] attribute repeatable? Let's say there is a method that needs to listen to different events. Would be great if I'd do like so:

#[LiveListener(eventName: 'rocket:launched')]
#[LiveListener(eventName: 'rocket:landed')]
public function foo(){
    // do something...
}

What do you think? 😃

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions