I am getting:
Call to a member function beginTransaction() on null
when importing data from Maatwebsite\Excel\Excel in Laravel and MongoDB. It's working fine on local but when I am running it on the server it's showing me this error.
CodePudding user response:
I think:
after install run:
php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider" --tag=config
then config file excel.php in config directory
CodePudding user response:
Resolved the issue.
set transaction handler to null in execl.php
'transactions' => [
'handler' => 'null'
]
then run php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider" --tag=config
