diff --git a/src/Illuminate/Database/Schema/Blueprint.php b/src/Illuminate/Database/Schema/Blueprint.php index f93ead286e23..0592f57107dc 100755 --- a/src/Illuminate/Database/Schema/Blueprint.php +++ b/src/Illuminate/Database/Schema/Blueprint.php @@ -787,11 +787,12 @@ public function unsignedBigInteger($column, $autoIncrement = false) * @param string $column * @param int $total * @param int $places + * @param bool $unsigned * @return \Illuminate\Database\Schema\ColumnDefinition */ - public function float($column, $total = 8, $places = 2) + public function float($column, $total = 8, $places = 2, $unsigned = false) { - return $this->addColumn('float', $column, compact('total', 'places')); + return $this->addColumn('float', $column, compact('total', 'places', 'unsigned')); } /** @@ -800,11 +801,12 @@ public function float($column, $total = 8, $places = 2) * @param string $column * @param int|null $total * @param int|null $places + * @param bool $unsigned * @return \Illuminate\Database\Schema\ColumnDefinition */ - public function double($column, $total = null, $places = null) + public function double($column, $total = null, $places = null, $unsigned = false) { - return $this->addColumn('double', $column, compact('total', 'places')); + return $this->addColumn('double', $column, compact('total', 'places', 'unsigned')); } /** @@ -813,11 +815,12 @@ public function double($column, $total = null, $places = null) * @param string $column * @param int $total * @param int $places + * @param bool $unsigned * @return \Illuminate\Database\Schema\ColumnDefinition */ - public function decimal($column, $total = 8, $places = 2) + public function decimal($column, $total = 8, $places = 2, $unsigned = false) { - return $this->addColumn('decimal', $column, compact('total', 'places')); + return $this->addColumn('decimal', $column, compact('total', 'places', 'unsigned')); } /** @@ -830,9 +833,7 @@ public function decimal($column, $total = 8, $places = 2) */ public function unsignedDecimal($column, $total = 8, $places = 2) { - return $this->addColumn('decimal', $column, [ - 'total' => $total, 'places' => $places, 'unsigned' => true, - ]); + return $this->decimal($column, $total, $places, true); } /**