public function getTableColumns($table, $allColumns = false)
    {
        $tableColumns = Schema::getColumnListing($table);

        $tableTypeColumns = [];
        $badColumns = ['id', 'created_at', 'updated_at'];

        if ($allColumns) {
            $badColumns = [];
        }

        foreach ($tableColumns as $column) {
            if (!in_array($column, $badColumns)) {
                $type = DB::connection()->getDoctrineColumn($table, $column)->getType()->getName();
                $tableTypeColumns[$column]['type'] = $type;
            }
        }

        return $tableTypeColumns;
    }
public function getTableColumns($table, $allColumns = false)
    {
        $tableColumns = Schema::getColumnListing($table);

        $tableTypeColumns = [];
        $badColumns = ['id', 'created_at', 'updated_at'];

        if ($allColumns) {
            $badColumns = [];
        }

        foreach ($tableColumns as $column) {
            if (!in_array($column, $badColumns)) {
                $type = DB::connection()->getDoctrineColumn($table, $column)->getType()->getName();
                $tableTypeColumns[$column]['type'] = $type;
            }
        }

        return $tableTypeColumns;
    }
public function getTableColumns ( $ table , $ allColumns = false ) { $ tableColumns = Schema :: getColumnListing ( $ table ) ; $ tableTypeColumns = [ ] ; $ badColumns = [ 'id' , 'created_at' , 'updated_at' ] ; if ( $ allColumns ) { $ badColumns = [ ] ; } foreach ( $ tableColumns as $ column ) { if ( ! in_array ( $ column , $ badColumns ) ) { $ type = DB :: connection ( ) -> getDoctrineColumn ( $ table , $ column ) -> getType ( ) -> getName ( ) ; $ tableTypeColumns [ $ column ] [ 'type' ] = $ type ; } } return $ tableTypeColumns ; }
Get Table Columns.

@param string $table Table name

@return array
Get Table Columns .