/** * Compile the blueprint's column definitions. * * @param \Illuminate\Database\Schema\Blueprint $blueprint * @return array */ protected function getColumns(Blueprint $blueprint) { $columns = array(); //foreach ($blueprint->getColumns() as $key => $column) // { // // Each of the column types have their own compiler functions which are tasked // // with turning the column definition into its SQL format for this platform // // used by the connection. The column's modifiers are compiled and added. // //$sql = $this->wrap($key); // // $columns[] = $key; // } foreach ($blueprint->getColumns() as $column) { // Each of the column types have their own compiler functions which are tasked // with turning the column definition into its SQL format for this platform // used by the connection. The column's modifiers are compiled and added. $sql = $this->wrap($column) . ' ' . $this->getType($column); $columns[] = $this->addModifiers($sql, $blueprint, $column); } return $columns; }