diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 9e735ee877a..04cb7f2fa4d 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -255,7 +255,7 @@ and its template: -Finally, create the controller which handles the form submission. This performs +Next, create the controller which handles the form submission. This performs the validation and saves the data into the database:: public function createAction() @@ -281,6 +281,31 @@ the validation and saves the data into the database:: ); } +Add New Routes +-------------- + +Next, update your routes + +.. code-block:: yml + + register: + pattern: /register + defaults: { _controller: AcmeAccountBundle:Account:register } + + create: + pattern: /create + defaults: { _controller: AcmeAccountBundle:Account:create } + +Run Doctrine Commands +--------------------- + +Finally, generate your entities and schema + +.. code-block:: + + php app/console doctrine:database:create + php app/console doctrine:schema:update --force + That's it! Your form now validates, and allows you to save the ``User`` object to the database. The extra ``terms`` checkbox on the ``Registration`` model class is used during validation, but not actually used afterwards when pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy