Send mail when create customer
Hi guys, when I try to create a customer I want to send an email to the admin as well as to the created customer, the difficulty is that in the Create Customer resource I have the protected function beforeCreate() and I'm only getting it to send it to the authenticated user , in this case the admin, how can I resolve this? Thanks
Solution:Jump to solution
You could use
afterCreate()
https://filamentphp.com/docs/3.x/panels/resources/creating-records#lifecycle-hooks
You need to add this method on the CreatePage
You can get the data using $this->data
or $this->record
...2 Replies
Solution
You could use
afterCreate()
https://filamentphp.com/docs/3.x/panels/resources/creating-records#lifecycle-hooks
You need to add this method on the CreatePage
You can get the data using $this->data
or $this->record
ok I'll try
it worked, thank you very much