Commit 0961f8f7 authored by Taylor Otwell's avatar Taylor Otwell

Fixing eloquent 2 query->first method.

parent d3af0153
...@@ -56,7 +56,7 @@ class Query { ...@@ -56,7 +56,7 @@ class Query {
{ {
$results = $this->hydrate($this->model, $this->table->take(1)->get($columns, false)); $results = $this->hydrate($this->model, $this->table->take(1)->get($columns, false));
return (is_array($results)) ? head($results) : $results; return (count($results) > 0) ? head($results) : null;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment