protected function setColumns($model)
    {
        $schema = $model->getConnection()->getDoctrineSchemaManager();
        $platform = $schema->getDatabasePlatform();

        // Prevents a DBALException if the table contains an enum.
        $platform->registerDoctrineTypeMapping('enum', 'string');

        list($table, $database) = $this->getTableAndDatabase($model);

        $this->columns = $model->getConnection()->getDoctrineConnection()->fetchAll(
            $platform->getListTableColumnsSQL($table, $database)
        );

        $this->rejectVirtualColumns();

        $columns = $this->columns;
        $this->columns = call_user_func(\Closure::bind(function () use ($table, $database, $columns) {
            return $this->_getPortableTableColumnList($table, $database, $columns);
        }, $schema, $schema));

        return $this->unquoteColumnNames($platform->getIdentifierQuoteCharacter());
    }
protected function setColumns($model)
    {
        $schema = $model->getConnection()->getDoctrineSchemaManager();
        $platform = $schema->getDatabasePlatform();

        // Prevents a DBALException if the table contains an enum.
        $platform->registerDoctrineTypeMapping('enum', 'string');

        list($table, $database) = $this->getTableAndDatabase($model);

        $this->columns = $model->getConnection()->getDoctrineConnection()->fetchAll(
            $platform->getListTableColumnsSQL($table, $database)
        );

        $this->rejectVirtualColumns();

        $columns = $this->columns;
        $this->columns = call_user_func(\Closure::bind(function () use ($table, $database, $columns) {
            return $this->_getPortableTableColumnList($table, $database, $columns);
        }, $schema, $schema));

        return $this->unquoteColumnNames($platform->getIdentifierQuoteCharacter());
    }
protected function setColumns ( $ model ) { $ schema = $ model -> getConnection ( ) -> getDoctrineSchemaManager ( ) ; $ platform = $ schema -> getDatabasePlatform ( ) ; // Prevents a DBALException if the table contains an enum. $ platform -> registerDoctrineTypeMapping ( 'enum' , 'string' ) ; list ( $ table , $ database ) = $ this -> getTableAndDatabase ( $ model ) ; $ this -> columns = $ model -> getConnection ( ) -> getDoctrineConnection ( ) -> fetchAll ( $ platform -> getListTableColumnsSQL ( $ table , $ database ) ) ; $ this -> rejectVirtualColumns ( ) ; $ columns = $ this -> columns ; $ this -> columns = call_user_func ( \ Closure :: bind ( function ( ) use ( $ table , $ database , $ columns ) { return $ this -> _getPortableTableColumnList ( $ table , $ database , $ columns ) ; } , $ schema , $ schema ) ) ; return $ this -> unquoteColumnNames ( $ platform -> getIdentifierQuoteCharacter ( ) ) ; }
Get the columns of a model's table.

@param  Model|BelongsToMany $model
@return Column[]
Get the columns of a model s table .