Hello
so i create a simple CRUD with env and database config just like the guide. I can do READ, Update, and Delete but getting this error(of the title) when do INSERT with ->save().
this is the config/database.php
'mongodb' => [
'driver' => 'mongodb',
'host' => env('DB_HOST', '192.168.16.53'),
'port' => env('DB_PORT', 27017),
'database' => env('DB_DATABASE'),
'username' => env('DB_USERNAME'),
'password' => env('DB_PASSWORD'),
'options' => [
'database' => 'admin',
]
],
and the .env
DB_CONNECTION=mongodb
DB_HOST=192.168.16.53
DB_PORT=27017
DB_DATABASE=shoes
DB_USERNAME=mongo-admin
DB_PASSWORD=password
i am using vagrant server for mongodb, and following https://www.linode.com/docs/databases/mongodb/build-database-clusters-with-mongodb/ tutorial for database clustering. only create not working, update read delete works