Is it possible to listen for different events with the same listener? Assuming the events were identical in every respect other than Class name, would it be possible to do something like:
handle(EventInterface $event) { ... }
in a listener?
So EventInterface would resolve to EventA or EventB.
Is this the right way of proceeding? Because now the problem becomes having to tell Laravel how to resolve the interface. I just want a scenario where the listener responds to either event A or event B. Is this possible or is there a better way?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community