Call $entityManager->persist() and pass the object to save. And then $entityManager->flush(). use Doctrine\ORM\EntityManagerInterface; class QuestionController extends AbstractController { public function new(EntityManagerInterface $entityManager) { $entityManager->persist($question); $entityManager->flush(); } } Yes, you need both lines. The persist() call simply says: Hey Doctrine! Please be “aware” of this Question object. The persist line does not make any queries. The INSERT query happens when we call flush(). The flush() method says: Yo Doctrine! Please look at all of the objects that you are “aware” of and make …
Disable keyboard shortcuts in Chrome browser
In development or personal, sometimes you may need to use some shortcuts in webpages. But if this shortcut is same as default shortcuts in Chrome, there can be problem. For example, if you want to use CTRL + T, it is already used to open new tab in Chrome browser. Unfortunately in Chrome, there is …