Error: Call to a member function beginTransaction() on null
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.
The mongo db driver does not support transactions. Disable them in the config file. First publish it with php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider" --tag=config and then change the handler
'transactions' => [
'handler' => 'null', //was db. Set to null
],
@sinnbeck am getting this error
PS C:\xampp\htdocs\redwing-backend-laravel> php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider" --tag=config
No publishable resources for tag [config].
Publishing complete.