Laravel事件監聽器listener與事件訂閱者Subscriber的區別

其實就一句話:
Each event can have multiple listeners, but a listener can't listen to more than a single event. If you want a class listening to many events, you should use the Event Subscribers.
每一個事件都可有多個監聽器,可是一個監聽器只能監聽一個事件。若是想在一個類中監聽多個事件,就須要適用事件訂閱者。事件

相關文章
相關標籤/搜索