Methods |
public
|
transaction(Closure $callback, int $attempts = 1): mixed
Execute a Closure within a transaction.
Execute a Closure within a transaction.
Throws
|
#
|
public
|
beginTransaction(): void
Start a new database transaction.
Start a new database transaction.
Throws
|
#
|
public
|
commit(): void
Commit the active database transaction.
Commit the active database transaction.
Throws
|
#
|
public
|
rollBack(int|null $toLevel = null): void
Rollback the active database transaction.
Rollback the active database transaction.
Throws
|
#
|
public
|
transactionLevel(): int
Get the number of active transactions.
Get the number of active transactions.
|
#
|
public
|
afterCommit(callable $callback): void
Execute the callback after a transaction commits.
Execute the callback after a transaction commits.
Throws
|
#
|