Skip to content

Commit fe0316d

Browse files
committed
Merge pull request laravel#313 from felixkiss/form-open-controller-action-with-parameters
Add example for Form::open() with route parameters
2 parents 95e3179 + 54f3d04 commit fe0316d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

html.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ You may also open forms that point to named routes or controller actions:
3232

3333
echo Form::open(array('action' => 'Controller@method'))
3434

35+
You may pass in route parameters as well:
36+
37+
echo Form::open(array('route' => array('route.name', $user->id)))
38+
39+
echo Form::open(array('action' => array('Controller@method', $user->id)))
40+
3541
If your form is going to accept file uploads, add a `files` option to your array:
3642

3743
echo Form::open(array('url' => 'foo/bar', 'files' => true))

0 commit comments

Comments
 (0)