title: export csv file from mysql database in laravel 5
body: <p>I have done import in laravel 5 but facing some problem while exporting file.
  code is not proper and doesnot give any logic.
  I have tried similiar to documentation </p>
  
  <pre><code>public function exportData(Test $test,Excel $excel){
    $test=$test-&gt;all();
      Excel::create('Test excel', function($test) {
  
      $test-&gt;sheet('sheet1', function($sheet) {
  
          $sheet-&gt;setOrientation('landscape');
  
      });
  
  })-&gt;export('xls');
      }
  </code></pre>
  
  <p>how to export csv file from mysql?
  I am using "maatwebsite/excel": "~2.0.0" package</p>