之前手多执行了一下composer update,然后发现导入的数据有问题,后来发现的laravel excel的toArray()返回的数据有问题,原来的下标是从0开始的,现在是从1开始。
Github有这个issue : https://github.com/Maatwebsite/Laravel-Excel/issues/856
原来是新的版本(2.1.3)有这个问题
解决方法:将Maatwebsite降级即可:修改composer.json "maatwebsite/excel": "2.1.2" 指定版本,再 composer update 就可以了。
因composer update导致Laravel Excel版本升级至2.1.3, 发现toArray()返回数据下标从1开始而非0。此问题已记录于GitHub issue #856。解决方案为将maatwebsite/excel版本降至2.1.2。
5万+

被折叠的 条评论
为什么被折叠?



