SpartnerNL / Laravel-Excel

🚀 Supercharged Excel exports and imports in Laravel
https://laravel-excel.com
MIT License
12.22k stars 1.91k forks source link

Collection::macro() Error #1386

Closed Andrew052113 closed 6 years ago

Andrew052113 commented 6 years ago

Hi,

Im using Laravel 5.0 and when i run this command:

php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider"

im getting this error:

[Symfony\Component\Debug\Exception\FatalErrorException] Call to undefined method Illuminate\Support\Collection::macro()

How can i solve this? Thank you.

gritdigital-mibu commented 6 years ago

Bump, same issue.

- Removing maatwebsite/excel (2.1.22)
  - Installing maatwebsite/excel (2.1.23)
    Downloading: 100%
Generating autoload files
> php artisan clear-compiled
PHP Fatal error:  Call to undefined method Illuminate\Support\Collection::macro() in /home/staging/vendor/maatwebsite/excel/src/Maatwebsite/Excel/ExcelServiceProvider.php on line 62

  [Symfony\Component\Debug\Exception\FatalErrorException]
  Call to undefined method Illuminate\Support\Collection::macro()

Script php artisan clear-compiled handling the post-update-cmd event returned with an error

Minor update seems to contain a breaking change (sadpanda)

Cheers

gritdigital-mibu commented 6 years ago

@Andrew052113

Change your composer.json to "maatwebsite/excel": "2.1.22" - it'll provide you with a temporary fix until it's patched.

Cheers

demoric102 commented 6 years ago

@Andrew052113 i have same issues but your solution doesnt work. What else can i do?

SinuheM commented 6 years ago

To solve this issue you need to delete the lines of this commit, all work normal without this lines

https://github.com/Maatwebsite/Laravel-Excel/commit/cd30d02cdca80991768f3c157d80e7af6a2a77ec?diff=split

If you dont want to delete this lines you need to update to laravel 5.2+