mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
feat: Rollback database transaction when halting from page
This commit is contained in:
@@ -124,9 +124,9 @@ abstract class BasePage extends Component implements HasActions, HasForms, HasIn
|
||||
(static::$reportValidationErrorUsing)($exception);
|
||||
}
|
||||
|
||||
protected function halt(): void
|
||||
protected function halt(bool $shouldRollbackDatabaseTransaction = false): void
|
||||
{
|
||||
throw new Halt;
|
||||
throw (new Halt)->rollBackDatabaseTransaction($shouldRollbackDatabaseTransaction);
|
||||
}
|
||||
|
||||
protected function callHook(string $hook): void
|
||||
|
||||
Reference in New Issue
Block a user