Hide Column From Export

I dont see an option to hide a column from an export conditionally? Am i missing something?
3 Replies
Mark Chaney
Mark Chaney4mo ago
Not my favorite solution, but i am already using a custom job/handle() for exports, so just added
if (isset($this->options['withTrashed']) && ! $this->options['withTrashed']) {
unset($this->columnMap['deleted_at']);
}
if (isset($this->options['withTrashed']) && ! $this->options['withTrashed']) {
unset($this->columnMap['deleted_at']);
}
Andy.PB
Andy.PB4mo ago
If you are using the Excel-Export Plugin there is a an Except() option.
Mark Chaney
Mark Chaney4mo ago
Nope, we are using the stock exporter