$job = new Job(); $job->title = $job_title; if ($job->save()) { /* how to get id? */ }
Is there a way to access $id of created document without new query to a database?
Have you tried $job->Id or $job->getId()?
you may use vardump($job) to find exactly the attribute name where you can access the id.
Hello
This is a example to create your mongo id https://zappysys.com/blog/ssis-loading-data-into-mongodb-upsert-update-delete-insert/
Hope This will help you.