Skip to content

Commit b0de5d8

Browse files
committed
Merge pull request symfony#2675 from jsarracco/patch-1
The instructions are incomplete.
2 parents 0da5e36 + b2440f6 commit b0de5d8

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

cookbook/doctrine/registration_form.rst

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ and its template:
255255
<input type="submit" />
256256
</form>
257257

258-
Finally, create the controller which handles the form submission. This performs
258+
Next, create the controller which handles the form submission. This performs
259259
the validation and saves the data into the database::
260260

261261
public function createAction()
@@ -281,6 +281,31 @@ the validation and saves the data into the database::
281281
);
282282
}
283283

284+
Add New Routes
285+
--------------
286+
287+
Next, update your routes
288+
289+
.. code-block:: yml
290+
291+
register:
292+
pattern: /register
293+
defaults: { _controller: AcmeAccountBundle:Account:register }
294+
295+
create:
296+
pattern: /create
297+
defaults: { _controller: AcmeAccountBundle:Account:create }
298+
299+
Run Doctrine Commands
300+
---------------------
301+
302+
Finally, generate your entities and schema
303+
304+
.. code-block::
305+
306+
php app/console doctrine:database:create
307+
php app/console doctrine:schema:update --force
308+
284309
That's it! Your form now validates, and allows you to save the ``User``
285310
object to the database. The extra ``terms`` checkbox on the ``Registration``
286311
model class is used during validation, but not actually used afterwards when

0 commit comments

Comments
 (0)
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