最近在laravel 上做导入excel 结果遇到大坑。网上说都是 maatwebsite/excel ,
https://github.com/maatwebsite/Laravel-Excel
如果是版本3.0+以上的,自动加载是会报错的Call to undefined method Maatwebsite\Excel\Excel::load()",网上说改成2.1版本,在我安装的时候发现composer 报错Installation failed, reverting ./composer.json to its original content.最后才发现在如果php版本过高,装2.1版本是不行的,2.1的环境要求是php <=7
无奈只能用回3.1。参考了这篇https://blog.csdn.net/dkwokaonima/article/details/103779110
最后成功了
最新评论