[英]Using maatwebsite excel with userfrosting
我正在嘗試導出自定義數據,該數據會在用戶凍結時輸入到DataTables中。 我已經使用composer加載了maatwebsite excel庫,並且autoload_classmap.php已更新。 在控制器中,我嘗試使用以下命令:
Excel::create('master',function($excel) use($events){
$excel->sheet('Master List', function($sheet) use($events){
$sheet->fromArray($events);
});
})->export('xls');
運行此命令時,出現以下錯誤:
PHP Fatal error: Class 'UserFrosting\Excel' not found in /usr/www
我查看了laravel示例並進行了嘗試,它們工作正常。 但是我需要使用它來處理用戶凍結,因為應用程序已經存在並且僅缺少導出。
我最終離開maatwebsite/excel
來使用phpoffice/phpexcel
,它對我來說工作更快一些,我將嘗試在不久的將來得到這個問題的答案。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.