Trait 'Illuminate\Foundation\Bus\DispatchesJobs' not found
I am using http://www.maatwebsite.nl/laravel-excel/docs to export and import the database to excel file. Everything was running like a charm, but after several days, I found that something wrong with this library. It does not sudden happen, indeed, I add more features in the application and finally found this error.
FatalErrorException in LaravelExcelReader.php line 29: Trait 'Illuminate\Foundation\Bus\DispatchesJobs' not found
It seems something wrong with the library that used from Maatwebsite library. After several hours trying to figure out what's the problem, I couldn't find any clue where the DispatchesJobs comes from.
Maybe, anybody have a clue for a problem that I face? I really appreciated for that. Thanks!
Answer
That was true @jedrzej.kurylo.. the Maatwebsite plugin version is the root cause of the problem. A problem that happen on me is that I declare in composer.json this.
"maatwebsite/excel": "~2.0",
if I remember well, I do run composer self-update before and automatically composer install the laters version(even though I already declare my composer.json in version 2.0).
To solve this problem, I add more detail in my composer.json
"maatwebsite/excel": "~2.0.0",
and then run composer update. The result is that the composer downgrade the library version.
Updating dependencies (including require-dev)
- Removing maatwebsite/excel (v2.1.0)
- Installing maatwebsite/excel (v2.0.10)
Loading from cache
After that, everything should be alright!
Related Questions
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?