View gist:d1fa00aff24553f16b510047edf5c2b5
mysql> select * from product; select * from category; select * from tag; select * from product_tag; +----+-----------+-------------+ | |
| id | name | category_id | | |
+----+-----------+-------------+ | |
| 1 | shampoo | 1 | | |
| 2 | skocreme | 1 | | |
| 3 | vase | 2 | | |
| 4 | hundesnor | 1 | | |
+----+-----------+-------------+ | |
4 rows in set (0.00 sec) |
View gist:b7dc4170c7be1a76a96991bb12d76b1c
mysql> select * from product; select * from category; select * from tag; select * from product_tag; | |
+----+----------+-------------+ | |
| id | name | category_id | | |
+----+----------+-------------+ | |
| 1 | shampoo | 1 | | |
| 2 | skocreme | 1 | | |
| 3 | vase | 2 | | |
+----+----------+-------------+ | |
3 rows in set (0.01 sec) |
View gist:7a65372d691f3d60c217
$form = $this->createFormBuilder(); | |
$registration = $this->get('form.factory')->createNamedBuilder('registration'); | |
$questionary = $this->get('form.factory')->createNamedBuilder('questionary'); | |
$registration | |
->add('name', 'text') | |
->add('city', 'text') | |
; | |
$questionary |
View gist:6798350
Your controller: | |
/** | |
* @Route("/") | |
* @Template() | |
*/ | |
public function indexAction(Request $request) | |
{ | |
$em = $this->getDoctrine()->getManager(); |