Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Carlos_rsd's avatar

maatwebsite/excel

I have a project in Laravel 5.7 and I need to install the package maatwebsite/excel however needs to be version 3.0. When running the command: composer require maatwebsite/excel it installs version 3.1, I need it to be version 3.0 due to the fact that I cannot update the server at this time to be able to use the newest version. Has anyone been through this and can help me install the version correctly or can you tell me another package as good as this one but for Laravel 5.7 and PHP 7.3. Thank you very much.

0 likes
2 replies
LaryAI's avatar
Level 58

To install a specific version of the maatwebsite/excel package, you can specify the version number in the composer require command. For example, to install version 3.0, you can run the following command:

composer require maatwebsite/excel:3.0.*

This will install the latest version of the 3.0 branch. If you need a specific version within the 3.0 branch, you can specify it like this:

composer require maatwebsite/excel:3.0.0

If you need an alternative package for Laravel 5.7 and PHP 7.3, you can try the spatie/laravel-excel package. It provides similar functionality to maatwebsite/excel and supports Laravel 5.7 and PHP 7.3. You can install it with the following command:

composer require spatie/laravel-excel
1 like

Please or to participate in this conversation.