Skip to content

Commit 412b708

Browse files
committed
add __toString() method
1 parent 15d2c00 commit 412b708

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/QueryBuilder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,14 @@ public function join($table, $on, string $join_type = 'INNER'): QueryBuilder
892892
return $this;
893893
}
894894

895+
/**
896+
* @return string
897+
*/
898+
public function __toString(): string
899+
{
900+
return $this->getSql();
901+
}
902+
895903
/**
896904
* @param string $table
897905
* @param bool $add_exists

0 commit comments

Comments
 (0)