skip to Main Content

Php – ChoiceType of Forms

I have a Symfony app with this form: $builder->add('test', ChoiceType::class, [ 'choices' => ['a' => 1, 'b' => 2], 'multiple' => false, 'mapped' => false, 'expanded' => true, ]); I display it with {{ form_widget(form.test) }} and I get :…

VIEW QUESTION

“Can PHP filter entities by today’s date?”

This is what I tried: $time = date('Y/m/d'); $alerts = $repository->findBy(['datum' => $time]); and $time = date('Y/m/d'); $lessons = $repository->createQueryBuilder('q') ->where('q.datum LIKE currentDate') ->setParameter('currentDate', $time); For some reason those don't work and I have no idea why. It should be…

VIEW QUESTION
Back To Top
Search