From 18f39065adeb0d41fdbdfbba565ae89b3552a7a9 Mon Sep 17 00:00:00 2001 From: Michael Newton Date: Thu, 20 Jul 2023 14:10:14 -0600 Subject: [PATCH] add documentation of FormElement::route() --- docs/general-usage/html-builder.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/general-usage/html-builder.md b/docs/general-usage/html-builder.md index 5121abc..c4cc78f 100644 --- a/docs/general-usage/html-builder.md +++ b/docs/general-usage/html-builder.md @@ -62,6 +62,13 @@ Generally speaking you'll want to use this in combination with `open()` and `clo ``` +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.