src/Traits/ExportsCollection.php
protected function exportableColumns(): array
    {
        if (method_exists($this->module, 'exportableColumns')) {
            return $this->module->exportableColumns();
        }

        /**
         * @var Model
         */
        $model = $this->module->model();

        return collect($model->getFillable())
            ->prepend('id')
            ->diff($model->getHidden())
            ->map(function ($column) use ($model) {
                return "{$model->getTable()}.{$column}";
            })
            ->when($model instanceof Translatable, function (Collection $collection) use ($model) {
                return $collection->merge(
                    collect($model->getTranslatedAttributes())
                        ->map(function ($column) use ($model) {
                            return "tt.{$column}";
                        })
                );
            })
            ->all();
    }
protected function exportableColumns(): array
    {
        if (method_exists($this->module, 'exportableColumns')) {
            return $this->module->exportableColumns();
        }

        /**
         * @var Model
         */
        $model = $this->module->model();

        return collect($model->getFillable())
            ->prepend('id')
            ->diff($model->getHidden())
            ->map(function ($column) use ($model) {
                return "{$model->getTable()}.{$column}";
            })
            ->when($model instanceof Translatable, function (Collection $collection) use ($model) {
                return $collection->merge(
                    collect($model->getTranslatedAttributes())
                        ->map(function ($column) use ($model) {
                            return "tt.{$column}";
                        })
                );
            })
            ->all();
    }
protected function exportableColumns ( ) : array { if ( method_exists ( $ this -> module , 'exportableColumns' ) ) { return $ this -> module -> exportableColumns ( ) ; } /**
         * @var Model
         */ $ model = $ this -> module -> model ( ) ; return collect ( $ model -> getFillable ( ) ) -> prepend ( 'id' ) -> diff ( $ model -> getHidden ( ) ) -> map ( function ( $ column ) use ( $ model ) { return "{$model->getTable()}.{$column}" ; } ) -> when ( $ model instanceof Translatable , function ( Collection $ collection ) use ( $ model ) { return $ collection -> merge ( collect ( $ model -> getTranslatedAttributes ( ) ) -> map ( function ( $ column ) use ( $ model ) { return "tt.{$column}" ; } ) ) ; } ) -> all ( ) ; }
Generate a list of exportable columns.

@return array
Generate a list of exportable columns .