Shouldn't it be `$columns` instead of column? Below there's `foreach($columns as $col)` and `$columns` will not be defined if `$column` value is array.