2

I'm working on a project with laravel 5.4. I'm editing an old project and adding some features. But I'm facing a problem with installing excel package that is suitable to this version. I think Maatwebsite/Laravel-Excel v:2.1 could be suitable but how can I install an old version of Maatwebsite/Laravel-Excel since the last version is is 3.1 ?

Nico Haase
  • 11,420
  • 35
  • 43
  • 69
Fateh Alrabeai
  • 660
  • 3
  • 17
  • 35
  • Does this answer your question? [How to install a specific version of package using Composer?](https://stackoverflow.com/questions/40914114/how-to-install-a-specific-version-of-package-using-composer) – Nico Haase Jan 11 '20 at 11:22

2 Answers2

5

Add

"maatwebsite/excel": "~2.1.0"

in composer and re-install composer packages

or run

composer require maatwebsite/excel:2.1.0

enter image description here

1

In addition to verifying PHP version, it seems better to run

composer require maatwebsite/excel:2.1.*

For example, Laravel 5.4 support starts in Maatwebsite/Laravel-Excel 2.1.10 and Laravel 5.5 support in Maatwebsite/Laravel-Excel 2.1.21

rboeg
  • 51
  • 6