Skip to content

Commit

Permalink
Update html.md
Browse files Browse the repository at this point in the history
Clarified that token is only automatically created when you use Form::open with POST, PUT or DELETE. It's not automatically created when you use GET.
  • Loading branch information
susanBuck committed Oct 16, 2014
1 parent 1432dcd commit f86e85a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ If your form is going to accept file uploads, add a `files` option to your array

#### Adding The CSRF Token To A Form

Laravel provides an easy method of protecting your application from cross-site request forgeries. First, a random token is placed in your user's session. Don't sweat it, this is done automatically. The CSRF token will be added to your forms as a hidden field automatically. However, if you wish to generate the HTML for the hidden field, you may use the `token` method:
Laravel provides an easy method of protecting your application from cross-site request forgeries. First, a random token is placed in your user's session. If you use the `Form::open` method with `POST`, `PUT` or `DELETE` the CSRF token will be added to your forms as a hidden field automatically. Alternatively, if you wish to generate the HTML for the hidden CSRF field, you may use the `token` method:

echo Form::token();

Expand Down

0 comments on commit f86e85a

Please sign in to comment.