I am first time to use Maatwebsite/Laravel-Excel.
When i download the 2.1 version, cmd will show
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
In excel.php line 59:
Undefined class constant 'XLSX'
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
I have no idea what happened.
If i download 2.0~2.9 , cmd will show installation failed.
If it's the first time installing Laravel-Excel it's interesting that you already have a config/excel.php
file. And looking at the error message it seems you have the 3.0 config file while trying to install the 2.1 version.
@patrickbrouwers Yes, sir . Actually, i download the Maatwebsite/Laravel-Excel 3.0 at the first time, but it show some error message in the controller.(cmd is good and download successfully) Then, i trying to google this message, and some people said the version 3.0 doesn't support import function... Therefore, i am trying to download the 2.0~2.1 version.
You have to delete the config/excel.php
before downgrading
@patrickbrouwers it work!!!!!!!!!!!!!!!! Thanks a lot for your help
You're welcome
so we need to delete config/excel.php first then we can use 2.1 version?
@aineelz You need to delete config/excel.php, and then run:
If you using laravel 4:
php artisan config:publish maatwebsite/excel
Else you are using laravel 5:
php artisan vendor:publish --provider="MaatwebsiteExcelExcelServiceProvider"
@MrCherevko Tq
patrickbrouwers your suggestion "You have to delete the config/excel.php before downgrading" works for me thanks
Most helpful comment
You have to delete the
config/excel.php
before downgrading