title: Class excel does not exist in Laravel 5.2
body: <p>I am trying to download excel in laravel 5.2. But server is given this error</p>
  
  <blockquote>
    <p>ReflectionException in Container.php line 734:   Class excel does not
    exist</p>
  </blockquote>
  
  <p><strong>this work  fine in localhost</strong></p>
  
  <p>this my <strong>function</strong> </p>
  
  <pre><code> return Excel::create('users', function($excel) use($datas) {
              return   $excel-&gt;sheet('Sheet 1', function($sheet) use($datas) {
  
                  $datasheet = array();
                  $datasheet[0]  =   array('id','Voucher No','Code','Expiry Date','Created_at');
                  $i=1;
                  foreach($datas as $datanew){
                      $datasheet[$i] = array( @$datanew['id'],
                          $datanew['vouchers_no'],
                          $datanew['code'],
                          $datanew['date'],
                          $datanew['created_at'],
                      );
                      $i++;
                  }
                  $sheet-&gt;fromArray($datasheet);
  
              });
  
          })-&gt;download('xlsx');
  </code></pre>
  
  <p>used packegeis</p>
  
  <blockquote>
    <p>maatwebsite/excel</p>
  </blockquote>
  
  <p>i am add this two line in <strong>config/app.php</strong></p>
  
  <pre><code>Maatwebsite\Excel\ExcelServiceProvider::class,
  'Excel' =&gt; Maatwebsite\Excel\Facades\Excel::class,
  </code></pre>
  
  <p>it work fine in localhost but showing error</p>