File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ and its template:
255
255
<input type="submit" />
256
256
</form>
257
257
258
- Finally , create the controller which handles the form submission. This performs
258
+ Next , create the controller which handles the form submission. This performs
259
259
the validation and saves the data into the database::
260
260
261
261
public function createAction()
@@ -281,6 +281,31 @@ the validation and saves the data into the database::
281
281
);
282
282
}
283
283
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
+
284
309
That's it! Your form now validates, and allows you to save the ``User ``
285
310
object to the database. The extra ``terms `` checkbox on the ``Registration ``
286
311
model class is used during validation, but not actually used afterwards when
You can’t perform that action at this time.
0 commit comments