예제 #1
0
 /**
  * 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 $column) {
         // Each of the column types have their own compiler functions which are
         // responsible for turning the column definition into its SQL format
         // for the platform. Then column modifiers are compiled and added.
         $sql = $this->wrap($column) . ' ' . $this->getType($column);
         $columns[] = $this->addModifiers($sql, $blueprint, $column);
     }
     return $columns;
 }