title: Laravel maatwebsite package data export problem
body: <p>I am using maatwebsite package in my laravel 7 project to download data form database in xlsx format. (reference Link: <a href="https://www.itsolutionstuff.com/post/laravel-6-import-export-excel-csv-file-tutorialexample.html" rel="nofollow noreferrer">https://www.itsolutionstuff.com/post/laravel-6-import-export-excel-csv-file-tutorialexample.html</a> )
  But I am clicking on the export button a empty file is downloading without any data.</p>
  <p>controller:</p>
  <pre><code>namespace App\Http\Controllers;
    
  use Illuminate\Http\Request;
  
  use Maatwebsite\Excel\Facades\Excel;
  use DB;
    
  class ExcelController extends Controller
  {
      
      public function export() 
      {
          $user=DB::table('admin')-&gt;get();
          return Excel::download($user,'users.xlsx');
      }
   }
  </code></pre>
  <p>blade.php:</p>
  <pre><code>  &lt;a class=&quot;btn btn-warning&quot; href=&quot;{{ route('export') }}&quot;&gt;Export User Data&lt;/a&gt;
  </code></pre>
  <p>route:</p>
  <pre><code>  Route::get('export', 'ExcelController@export')-&gt;name('export');
  </code></pre>
  <p>It is only downloading a empty file,how to get all data of admin table in xlsx format</p>