Update ResourceServicesFactory.php

Pass templates in controller when mongodb has chosen as driver.