我在excel中使用setAutoFilter时使用laravel 5.7框架他给了我错误

时间:2019-05-29 15:24:41

标签: laravel

count():参数必须是实现Countable的数组或对象

 return $this - > excel - > create($this - > getReportName(), function($excel) {


     #Set standard properties on the file
     $this - > setProperties($excel);


     #Produce the tab
     # @todo exctract tabs into their own classes
     $excel - > sheet('Program List Report', function($sheet) {
         $sheet - > loadView('reports.program.list.report') 
         - > with('programs', $this - > candidates) 
         - > setAutoFilter() 
         - > freezeFirstRow() 
         - > setColumnFormat($this - > getFormats());
     });


     #Set the includeSql = true to have SQL Printout tab
     # includeSql should NEVER be true
     for production reports
     $this - > includeSqlTab($excel);


     #Make the first sheet active
     $excel - > setActiveSheetIndex(0);

 }) - > store('xlsx', $this - > getReportPath(), true);

0 个答案:

没有答案