Allow statically call beginTransaction, rollback and commit methods.
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user