src/Migrations/SyntaxBuilder.php
private function createSchemaForViewMethod($schema, $meta, $type = 'index-header')
    {


        if (!$schema) return '';

        $fields = array_map(function ($field) use ($meta, $type) {
            return $this->AddColumn($field, 'view-' . $type, $meta);
        }, $schema);


        // Format code
        if ($type == 'index-header') {
            return implode("\n" . str_repeat(' ', 24), $fields);
        } else {
            // index-content
            return implode("\n" . str_repeat(' ', 20), $fields);
        }

    }
private function createSchemaForViewMethod($schema, $meta, $type = 'index-header')
    {


        if (!$schema) return '';

        $fields = array_map(function ($field) use ($meta, $type) {
            return $this->AddColumn($field, 'view-' . $type, $meta);
        }, $schema);


        // Format code
        if ($type == 'index-header') {
            return implode("\n" . str_repeat(' ', 24), $fields);
        } else {
            // index-content
            return implode("\n" . str_repeat(' ', 20), $fields);
        }

    }
private function createSchemaForViewMethod ( $ schema , $ meta , $ type = 'index-header' ) { if ( ! $ schema ) return '' ; $ fields = array_map ( function ( $ field ) use ( $ meta , $ type ) { return $ this -> AddColumn ( $ field , 'view-' . $ type , $ meta ) ; } , $ schema ) ; // Format code if ( $ type == 'index-header' ) { return implode ( "\n" . str_repeat ( ' ' , 24 ) , $ fields ) ; } else { // index-content return implode ( "\n" . str_repeat ( ' ' , 20 ) , $ fields ) ; } }
Construct the view fields

@param $schema
@param $meta
@param string $type Params 'header' or 'content'
@return string
Construct the view fields