src/Traits/ExportsCollection.php
protected function exportableQuery(Builder $query): Builder
    {
        // Allow executing custom exportable query.
        if (method_exists($this->module, 'exportableQuery')) {
            return $this->module->exportableQuery($query);
        }

        return $query
            ->when($query->getModel() instanceof Translatable, function ($query) {
                $query->translated();
            })
            // leave select after joining with translations
            // table in order to rewrite selected columns
            ->select($this->exportableColumns());
    }
protected function exportableQuery(Builder $query): Builder
    {
        // Allow executing custom exportable query.
        if (method_exists($this->module, 'exportableQuery')) {
            return $this->module->exportableQuery($query);
        }

        return $query
            ->when($query->getModel() instanceof Translatable, function ($query) {
                $query->translated();
            })
            // leave select after joining with translations
            // table in order to rewrite selected columns
            ->select($this->exportableColumns());
    }
protected function exportableQuery ( Builder $ query ) : Builder { // Allow executing custom exportable query. if ( method_exists ( $ this -> module , 'exportableQuery' ) ) { return $ this -> module -> exportableQuery ( $ query ) ; } return $ query -> when ( $ query -> getModel ( ) instanceof Translatable , function ( $ query ) { $ query -> translated ( ) ; } ) // leave select after joining with translations // table in order to rewrite selected columns -> select ( $ this -> exportableColumns ( ) ) ; }
Fetch exportable items by query.

@param Builder $query

@return Builder
Fetch exportable items by query .