Skip to content

Commit 1e8bb52

Browse files
Add scalar function to the database connection interface (#47590)
1 parent c5a7c14 commit 1e8bb52

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Illuminate/Database/ConnectionInterface.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ public function raw($value);
3333
*/
3434
public function selectOne($query, $bindings = [], $useReadPdo = true);
3535

36+
/**
37+
* Run a select statement and return the first column of the first row.
38+
*
39+
* @param string $query
40+
* @param array $bindings
41+
* @param bool $useReadPdo
42+
* @return mixed
43+
*
44+
* @throws \Illuminate\Database\MultipleColumnsSelectedException
45+
*/
46+
public function scalar($query, $bindings = [], $useReadPdo = true);
47+
3648
/**
3749
* Run a select statement against the database.
3850
*

0 commit comments

Comments
 (0)