F
Filament14mo ago
Xiquita

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
No description
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->dataor $this->record...
Jump to solution
2 Replies
Solution
LeandroFerreira
LeandroFerreira14mo ago
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->dataor $this->record
Xiquita
XiquitaOP14mo ago
ok I'll try it worked, thank you very much
Want results from more Discord servers?
Add your server