public function transaction($closure, $execute=true)
    {
        $transaction = static::connection()->transaction();
        $transaction->callback($closure, $this);

        if($execute)
            $transaction->execute();

        return $transaction;
    }
public function transaction($closure, $execute=true)
    {
        $transaction = static::connection()->transaction();
        $transaction->callback($closure, $this);

        if($execute)
            $transaction->execute();

        return $transaction;
    }
public function transaction ( $ closure , $ execute = true ) { $ transaction = static :: connection ( ) -> transaction ( ) ; $ transaction -> callback ( $ closure , $ this ) ; if ( $ execute ) $ transaction -> execute ( ) ; return $ transaction ; }
Creates a transaction, passes the instance
@return Transaction
Creates a transaction passes the instance