Browse Source

Merge pull request #774 from franzliedke/patch-8

Avoid unnecessary end() in Table::command() function
Taylor Otwell 12 years ago
parent
commit
1b062499dd
1 changed files with 2 additions and 6 deletions
  1. 2 6
      laravel/database/schema/table.php

+ 2 - 6
laravel/database/schema/table.php

@@ -393,9 +393,7 @@ class Table {
 	{
 		$parameters = array_merge(compact('type'), $parameters);
 
-		$this->commands[] = new Fluent($parameters);
-
-		return end($this->commands);
+		return $this->commands[] = new Fluent($parameters);
 	}
 
 	/**
@@ -409,9 +407,7 @@ class Table {
 	{
 		$parameters = array_merge(compact('type'), $parameters);
 
-		$this->columns[] = new Fluent($parameters);
-
-		return end($this->columns);
+		return $this->columns[] = new Fluent($parameters);
 	}
 
 }