How to do action after create Filament Resource #11999
Unanswered
MahmoudAdelMansour
asked this question in
Help
Replies: 1 comment 14 replies
-
I suppose you could use a lifecycle hook in your protected function afterCreate(): void
{
// do what you need to do to send the newsletter. Perhaps dispatch a job
SendNewsletter::dispatch();
} Or if you prefer to use a lifecycle hook on the CreateAction::make()
->after(function () {
SendNewsletter::dispatch();
}) |
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Package
Form builder
Package Version
v3
How can we help you?
i use filament resource for Product Resource , and i want to send newsletter or do anything after record ,
i see there's ->after or ->before or ->action method's but i try do use it with form but i don't how to do it ,
i know there's a solution to do that with model , but my task is to do that at filament resource with create action ,
any idea ?
Beta Was this translation helpful? Give feedback.
All reactions