Skip to content

Commit

Permalink
Merge pull request #16625 from yuandalu/yuandalu-patch-1
Browse files Browse the repository at this point in the history
[5.3] Connection selectOne  Add useReadPdo
  • Loading branch information
taylorotwell authored Dec 2, 2016
2 parents 27ced8f + 8afc151 commit 5b4db8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Illuminate/Database/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,12 @@ public function raw($value)
*
* @param string $query
* @param array $bindings
* @param bool $useReadPdo
* @return mixed
*/
public function selectOne($query, $bindings = [])
public function selectOne($query, $bindings = [], $useReadPdo = true)
{
$records = $this->select($query, $bindings);
$records = $this->select($query, $bindings, $useReadPdo);

return count($records) > 0 ? reset($records) : null;
}
Expand Down

0 comments on commit 5b4db8c

Please sign in to comment.