Add getRedirectUrl method to resource creation classes for consistent redirection

This commit is contained in:
dhanabalan
2025-08-26 15:44:51 +05:30
parent 86e458037f
commit d419973ab5
25 changed files with 133 additions and 3 deletions

View File

@@ -12,11 +12,15 @@ class CreateAlertMailRule extends CreateRecord
protected function mutateFormDataBeforeCreate(array $data): array
{
if ($data['is_active']) {
$data['plant'] = 0;
}
return $data;
}
protected function getRedirectUrl(): string
{
return $this->getResource()::getUrl('create');
}
}