title: export excel sheet with where condition of sql in Laravel
body: <pre><code>public function cal1(request $request){
         $request-&gt;validate([
           'month' =&gt; 'required'
         ]);
         $month1 = $request-&gt;get('month');
        // dd($month1);
        $date = DB::table('users')-&gt;where('date', '==', $month1);
         return Excel::download(new UsersExport($date), 'users.xlsx');
      
  }
  </code></pre>
  <p>here is my controller, it exports the excel sheet with all the data in DB table. I want to export excel sheet having data month wise. thanks in advance.</p>