original_string: public function download($query, $filename)
      {
          $this->query      = $query;
          $this->modelClass = get_class($query->getModel());
  
          $temporary = $this->generateExport();
  
          if ( ! $temporary) {
              return false;
          }
  
          return response()->download($temporary, $filename)->deleteFileAfterSend(true);
      }
code: public function download($query, $filename)
      {
          $this->query      = $query;
          $this->modelClass = get_class($query->getModel());
  
          $temporary = $this->generateExport();
  
          if ( ! $temporary) {
              return false;
          }
  
          return response()->download($temporary, $filename)->deleteFileAfterSend(true);
      }
code_tokens: public function download ( $ query , $ filename ) { $ this -> query = $ query ; $ this -> modelClass = get_class ( $ query -> getModel ( ) ) ; $ temporary = $ this -> generateExport ( ) ; if ( ! $ temporary ) { return false ; } return response ( ) -> download ( $ temporary , $ filename ) -> deleteFileAfterSend ( true ) ; }
docstring: Exports data returned by listing query and returns a download response for it.
  
  @param EloquentBuilder|QueryBuilder $query
  @param string                       $filename name the download should be given
  @return mixed|false
docstring_tokens: Exports data returned by listing query and returns a download response for it .