Skip to content

Commit

Permalink
Update Connection.php
Browse files Browse the repository at this point in the history
`selectOne` method lack of attribute,Everyone needs this
  • Loading branch information
yuandalu authored Dec 2, 2016
1 parent 11a2428 commit 8afc151
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 8afc151

Please sign in to comment.