I have gone over many times in the configuration to make sure everything is correct and it is as well as uploaded the files in my vendor folder but still getting the following error
Class 'Maatwebsite\Excel\ExcelServiceProvider' not found
So I am not sure why
Are you sure you've followed the installation instructions as mentioned here: https://github.com/Maatwebsite/Laravel-Excel#installation correctly?
I gather from your response you didn't use composer? Also adding the lines in the app/config/app.php file is very important.
With L5.2 had the same issue.
Take these steps:
Hope it helps!
No,its not working. It shows me error
Class 'Maatwebsite\Excel\ExcelServiceProvider' not found
I am using laravel-5
Same here... :sob: Tried to install in a new project laravel 5.0 and I get the same error.
Make sure you publish after following these steps
"maatwebsite/excel": "~2.1.0",then run
composer update
'Maatwebsite\Excel\ExcelServiceProvider',and alias like so
'Excel' => 'Maatwebsite\Excel\Facades\Excel',
php artisan vendor:publish for Laravel 5php artisan config:publish maatwebsite/excel for L4I hope it helps someone.!
For Laravel 5, because I can't verify every major release of that version, if you see providers array values in config/app.php that ends up with ::class, follow that pattern. So Maatwebsite\Excel\ExcelServiceProvider will be Maatwebsite\Excel\ExcelServiceProvider::class. To recap:
require the "maatwebsite/excel": "~2.1.0".composer update.Maatwebsite\Excel\ExcelServiceProvider::class in the providers array. You may also add'Excel' => Maatwebsite\Excel\Facades\Excel::class in your aliases array just below providers array.php artisan vendor:publish. You should see excel.php in the config folder.Put allias
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
And then in your controller
use Excel
@shadywattay Thanks! you saved me. Thanks a ton...
Most helpful comment
Make sure you publish after following these steps
"maatwebsite/excel": "~2.1.0",then run
composer updatethe providers array in app/config/app.php like
'Maatwebsite\Excel\ExcelServiceProvider',and alias like so
'Excel' => 'Maatwebsite\Excel\Facades\Excel',php artisan vendor:publishfor Laravel 5php artisan config:publish maatwebsite/excelfor L4I hope it helps someone.!