phplaravellaravel-excel

Laravel excel Class 'ZipArchive' not found


I have laravel project with ability to upload data to mysql from .csv file using laravel-excel plugin.

When I try to upload data to mysql from .csv file, I get error "Class 'ZipArchive' not found". Can't understand what 'zip' has to do with it, if I use .csv I am using: VMware Debian server, PHP 7.1

Everything works fine on my PC, localhost.


Solution

  • This happens when you have not installed the zip-extension.

    you can install it like

    sudo apt-get install php7.1-zip
    

    after installing make sure restart the server.

    Hope this helps.