public function export($query, $path)
    {
        $this->query      = $query;
        $this->modelClass = get_class($query->getModel());

        return $this->generateExport($path);
    }
public function export($query, $path)
    {
        $this->query      = $query;
        $this->modelClass = get_class($query->getModel());

        return $this->generateExport($path);
    }
public function export ( $ query , $ path ) { $ this -> query = $ query ; $ this -> modelClass = get_class ( $ query -> getModel ( ) ) ; return $ this -> generateExport ( $ path ) ; }
Exports data returned by a model listing query to a file.

@param EloquentBuilder|QueryBuilder $query
@param string                       $path full path to save the output to
@return string|false     full path string if successful
Exports data returned by a model listing query to a file .