From b2cb8d68835b265db29df48053d75641561f9701 Mon Sep 17 00:00:00 2001 From: kj Date: Tue, 15 Jul 2025 18:12:41 -0300 Subject: [PATCH] Allow statically call beginTransaction, rollback and commit methods. --- src/Libs/Model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Libs/Model.php b/src/Libs/Model.php index 28935c9..d7b7175 100644 --- a/src/Libs/Model.php +++ b/src/Libs/Model.php @@ -72,7 +72,7 @@ class Model { * * @return bool */ - public function beginTransaction(): bool + public static function beginTransaction(): bool { return static::db()->beginTransaction(); } @@ -83,7 +83,7 @@ class Model { * * @return bool */ - public function rollBack(): bool + public static function rollBack(): bool { if ( static::db()->inTransaction()) return static::db()->rollBack(); @@ -97,7 +97,7 @@ class Model { * * @return bool */ - public function commit(): bool + public static function commit(): bool { if (static::db()->inTransaction()) return static::db()->commit();