original_string: public function excel($filename, $data)
      {
          \Excel::create($filename, function ($excel) use ($filename, $data) {
              $excel->sheet($filename, function ($sheet) use ($data) {
                  $sheet->fromArray($data);
              });
          })
                ->export('xlsx');
      }
code: public function excel($filename, $data)
      {
          \Excel::create($filename, function ($excel) use ($filename, $data) {
              $excel->sheet($filename, function ($sheet) use ($data) {
                  $sheet->fromArray($data);
              });
          })
                ->export('xlsx');
      }
code_tokens: public function excel ( $ filename , $ data ) { \ Excel :: create ( $ filename , function ( $ excel ) use ( $ filename , $ data ) { $ excel -> sheet ( $ filename , function ( $ sheet ) use ( $ data ) { $ sheet -> fromArray ( $ data ) ; } ) ; } ) -> export ( 'xlsx' ) ; }
docstring: Export date to Excel file.
  
  @param $filename
  @param $data
docstring_tokens: Export date to Excel file .