I want to show modal after saving data for choosing that users go to listing page or edit page.
I also try afterCreate() but after Create not show modal box
protected function afterCreate(): void
{
$user = $this->record;
Action::make('User Created')
->modalDescription('Would you like to configure additional settings?')
->modalIconColor('success')
->form([
Action::make('skip')
->color('secondary')
->url(MerchantResource::getUrl('index')),
Action::make('setup')
->color('primary')
->url(MerchantResource::getUrl('edit', ['record' => $merchant])),
]);
}
1 Reply
It wouldn't work like that, you would need to trigger an action with a listener. If you are using simple create method (modal) already:
https://dev.to/biostate/how-to-trigger-another-action-in-filamentphp-41hk
DEV Community
How to Trigger Another Action in FilamentPHP
If you have an Action in FilamentPHP and want to trigger another action sequentially within it, you...