Skip to content

Commit 23563ce

Browse files
Merge pull request #2 from DatabaseFactory/master
Merge Features
2 parents 2dc0f32 + a70dbe8 commit 23563ce

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Facades/DB.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ public static function connection(): \PDO
4444
return Connect::connection();
4545
}
4646

47+
/**
48+
* Allows for the execution of raw SQL
49+
*
50+
* @param string $sql
51+
*
52+
* @return array|false
53+
*/
54+
public static function query(string $sql): array|false
55+
{
56+
return Connect::connection()->query(trim($sql))->fetchAll(\PDO::FETCH_ASSOC);
57+
}
58+
4759
/**
4860
* Returns a query builder instance
4961
*

0 commit comments

Comments
 (0)