Level 51
You need to update your code as per the upgrade guide as ::create has been removed. use Excel::download() or Excel::store() instead
5 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,guys... I have been add providers and aliases. I can't find yet! Still, I got the error message
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to undefined method Maatwebsite\Excel\Excel::create()
and my package version
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"maatwebsite/excel": "^3.1",
"predis/predis": "^1.1",
"uxweb/sweet-alert": "^2.0"
controller
use Excel;
public function export_list()
{
Excel::create('Export data', function($excel) {
$excel->sheet('Sheet', function($sheet) {
$data = User::where('city','ygn')->get();
$sheet->fromArray($data);
});
})->download('xls');
}
Pls,can you suggest me?
You need to update your code as per the upgrade guide as ::create has been removed. use Excel::download() or Excel::store() instead
Please or to participate in this conversation.