Browse Source

Merge pull request #892 from jasonlewis/bug/database/select

Fixes #818, allows Query select to just be an Expression.
Taylor Otwell 12 years ago
parent
commit
90447e7183
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/database/query.php

+ 1 - 1
laravel/database/query.php

@@ -140,7 +140,7 @@ class Query {
 	 */
 	public function select($columns = array('*'))
 	{
-		$this->selects = (array) $columns;
+		$this->selects = is_array($columns) ? $columns : array($columns);
 		return $this;
 	}