Laravel Model Events - I'm a bit confused about where they're meant to go

后端 未结 9 819
长发绾君心
长发绾君心 2020-12-07 13:15

So the way I see it is that a good Laravel application should be very model- and event-driven.

I have a Model called Article. I wish to send email alert

9条回答
  •  孤街浪徒
    2020-12-07 13:44

    You can have multiple listeners on an event. So you may have a listener that sends an email when an article is updated, but you could have a totally different listener that does something totally different—they’ll both be executed.

提交回复
热议问题