Fixing eloquent 2 query->first method.
This commit is contained in:
@@ -56,7 +56,7 @@ class Query {
|
||||
{
|
||||
$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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user