Skip to content

Commit

Permalink
add documentation of FormElement::route()
Browse files Browse the repository at this point in the history
  • Loading branch information
miken32 authored Jul 20, 2023
1 parent f1c2778 commit 18f3906
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/general-usage/html-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ Generally speaking you'll want to use this in combination with `open()` and `clo
</form>
```

The `route()` method can be chained to `form()` to simplify the specification of a form's action URI:
```html
{{ html()->form('PUT')->route('item.update') }}
```
This uses Laravel's [`route()` helper](https://laravel.com/docs/10.x/helpers#method-route) under the hood and accepts the same arguments.


### Building a form with a model

To make things easier we've added the `modelForm()` and `closeModelForm()` methods to easily open and close a form that's coupled to a model. Under the hood the `model()` and `endModel()` methods are used.
Expand Down

0 comments on commit 18f3906

Please sign in to comment.