protected function formatFields($fields)
	{
		if (! is_array($fields))
		{
			return $fields;
		}

		$return = [];

		foreach ($fields as $field)
		{
			$return[$field->name] = [
				'type'     => $field->type,
				'default'  => $field->default,
				'nullable' => $field->nullable,
			];

			if ($field->primary_key)
			{
				$this->keys[$field->name] = [
					'fields' => [$field->name],
					'type'   => 'primary',
				];
			}
		}

		return $return;
	}
protected function formatFields($fields)
	{
		if (! is_array($fields))
		{
			return $fields;
		}

		$return = [];

		foreach ($fields as $field)
		{
			$return[$field->name] = [
				'type'     => $field->type,
				'default'  => $field->default,
				'nullable' => $field->nullable,
			];

			if ($field->primary_key)
			{
				$this->keys[$field->name] = [
					'fields' => [$field->name],
					'type'   => 'primary',
				];
			}
		}

		return $return;
	}
protected function formatFields ( $ fields ) { if ( ! is_array ( $ fields ) ) { return $ fields ; } $ return = [ ] ; foreach ( $ fields as $ field ) { $ return [ $ field -> name ] = [ 'type' => $ field -> type , 'default' => $ field -> default , 'nullable' => $ field -> nullable , ] ; if ( $ field -> primary_key ) { $ this -> keys [ $ field -> name ] = [ 'fields' => [ $ field -> name ] , 'type' => 'primary' , ] ; } } return $ return ; }
Converts fields retrieved from the database to
the format needed for creating fields with Forge.

@param array|boolean $fields

@return mixed
Converts fields retrieved from the database to the format needed for creating fields with Forge .